Guest Posted June 1, 2003 Report Posted June 1, 2003 This code (in the FSUIPC_Open function) returns a System.NullReferenceException (as szTemp is never loaded): ' create the name of our file-mapping object nTry = nTry + 1 ' Ensures a unique string is used in case user closes and reopens szName = FS6IPC_MSGNAME1 & ":" & Hex(GetCurrentProcessId()) & ":" & Hex(nTry) & Chr(0) If (szName.Length > 23) Then '24 chars max szName = szTemp.Substring(0, 23) & Chr(0) End If I've modified to: ' create the name of our file-mapping object nTry = nTry + 1 ' Ensures a unique string is used in case user closes and reopens szName = FS6IPC_MSGNAME1 & ":" & Hex(GetCurrentProcessId()) & ":" & Hex(nTry) & Chr(0) If (szName.Length > 23) Then '24 chars max szName = szName.Substring(0, 23) & Chr(0) End If and removed the Dim for szTemp. That solved the problem. Jim
jyoungken Posted June 1, 2003 Report Posted June 1, 2003 Too weird, didn't log me in. Having cookie problems or something. Jim
Pete Dowson Posted June 1, 2003 Report Posted June 1, 2003 This code (in the FSUIPC_Open function) returns a System.NullReferenceException (as szTemp is never loaded): Thanks. I'll forward your message to the author. I had assumed he'd tested it, so this is a bit odd. I know nothing about VB or .Net so I don't just want to change it myself. Pete
jyoungken Posted June 2, 2003 Report Posted June 2, 2003 Anytime. If I find anything else while debugging my program, I'll post them. Jim
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now