B
ba.hons
Hello,
I have another method in a DLL which i am trying to use and i keep
getting null reference exception can anyone shed any light on this.
int GetConnectedControllers(char * controllers , int controllersSize)
which should return buffer of chars which indicates readers connected.
which i imagine looks like
"reader1,reader2 etc"
my decleration for this method in c# is
[DllImport("MyDll.dll", SetLastError = true, CharSet = CharSet.Ansi)]
static extern int GetConnectedControllers(out
System.Text.StringBuilder test5,
int ControllersSize);
then i call in my application
int x=Form1.GetConnectedControllers(out test5, 1000);
then test5 seems to go out of scope.
I am completely lost on this.
any help appreciated!
Adam
I have another method in a DLL which i am trying to use and i keep
getting null reference exception can anyone shed any light on this.
int GetConnectedControllers(char * controllers , int controllersSize)
which should return buffer of chars which indicates readers connected.
which i imagine looks like
"reader1,reader2 etc"
my decleration for this method in c# is
[DllImport("MyDll.dll", SetLastError = true, CharSet = CharSet.Ansi)]
static extern int GetConnectedControllers(out
System.Text.StringBuilder test5,
int ControllersSize);
then i call in my application
int x=Form1.GetConnectedControllers(out test5, 1000);
then test5 seems to go out of scope.
I am completely lost on this.
any help appreciated!
Adam