i have an activeXControl that have a function public virtual void GetCurrentUID(int)
this function only work when my program get an event from the machine.
my question, when i access this function in C#/.NET, the event always back from the start. this is my code :
int[] pUID = new int[7];
myMachine.GetCurrentUID(pUID[0]);
but, i try it in VB.NET and success, and i think this is really strange for me, i must passing this argument with reference. This function in object browser said like this Public Overridable Sub GetCurrentUID(ByVal pUID As Integer), and my code :
Dim bUID(6) As Byte
MyMachine.GetCurrentUID(VarPtrAny(bUID(0)))
VarPtrAny is a private function that i took in other forums, its written like this
Private Declare Function VarPtrAny Lib "msvbvm60.dll" Alias "VarPtr" (ByRef lpObject As Byte) As Integer
so, may you help me to convert this code from VB.NET to C#.NET? please, i need to make this program in C#.NET.