Click here to Skip to main content
16,006,348 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: 3D Globe Pin
Ed.Poore15-Apr-06 23:33
Ed.Poore15-Apr-06 23:33 
GeneralRe: 3D Globe Pin
spelltwister28-Apr-06 18:41
spelltwister28-Apr-06 18:41 
GeneralRe: 3D Globe Pin
Ed.Poore28-Apr-06 23:32
Ed.Poore28-Apr-06 23:32 
QuestionApplication Framework Pin
GtheMan14-Apr-06 12:30
GtheMan14-Apr-06 12:30 
AnswerRe: Application Framework Pin
GtheMan14-Apr-06 21:21
GtheMan14-Apr-06 21:21 
QuestionVC++ "Handle" type causing issues in .NET Pin
REnginear14-Apr-06 10:37
REnginear14-Apr-06 10:37 
AnswerRe: VC++ "Handle" type causing issues in .NET Pin
Dave Kreskowiak14-Apr-06 12:06
mveDave Kreskowiak14-Apr-06 12:06 
GeneralRe: VC++ "Handle" type causing issues in .NET Pin
REnginear15-Apr-06 12:59
REnginear15-Apr-06 12:59 
Thank you very much. Even with Byval, the System.nullexcepton occurs and infact I do not get a handle value at all. (With ByRef, I do get the correct handle back as an integer along with the system.nullexception.

--this is how the handle type is defined in the PLXAPI.DLL
typedef void *HANDLE; (in winnt.h)

typedef HANDLE PLX_DRIVER_HANDLE;
typedef int PLX_DRIVER_HANDLE;
--

So, I think that Handle is an integer in VB.NET?? However the structure type, as you suggested, has a problem:

The structure is defined as:

(in DLL)

typedef struct _DEVICE_LOCATION
{
U8 BusNumber;
U8 SlotNumber;
U16 DeviceId;
U16 VendorId;
U8 SerialNumber[12];
} DEVICE_LOCATION;

----------------
VB.NET Structure - my equivalent


Structure PCIDevice
Dim BusNumber As Byte
Dim SlotNumber As Byte
Dim DeviceId As Short
Dim VendorId As Short
Dim SerialNumber() As Byte
End Structure
---------

Values sent to DLL (which modifies these values and I think thats where it is crashing!!!!)

dim device as pcidevice
Dim serialno As String = "PCI9030-0"
Device.BusNumber = System.Convert.ToByte(1)
Device.SlotNumber = System.Convert.ToByte(0)
Device.VendorId = System.Convert.ToUInt16(&H10B5)
Device.DeviceId = System.Convert.ToUInt16(&H9030)
ReDim Device.SerialNumber(11)

Device.SerialNumber = serialno.ToCharArray

---------
DLL DEBUG LOG SAYS:

Dev->BusNumber = 01
Dev->SlotNumber = 00
Dev->DeviceId = 9030
Dev->VendorId = 10B5
Dev->SerialNumber =
-------
serial number field goes in blank. so it is nto translated correctly. All the rest of the values are correct. On return, the DLL tries to write to the serial number "PCI-9030-0" back to the structure in the serial number field and I that is where I think it is failing. the serial number is assinged by teh dll in this generic fashion and since there i sonly one PCI-9030 device in our setup, that number never changes.

So, somehow I have to translate the serialNumber field to teh DLL correctly and make it a datatype that the C dll can write to.

GeneralRe: VC++ "Handle" type causing issues in .NET Pin
REnginear16-Apr-06 13:58
REnginear16-Apr-06 13:58 
QuestionDataset bound to combobox Pin
G7236014-Apr-06 9:28
G7236014-Apr-06 9:28 
AnswerRe: Dataset bound to combobox Pin
Dave Kreskowiak17-Apr-06 4:24
mveDave Kreskowiak17-Apr-06 4:24 
QuestionAdvice for tracking a recordset change - Hash Value? Pin
Brad6ft414-Apr-06 7:59
Brad6ft414-Apr-06 7:59 
AnswerRe: Advice for tracking a recordset change - Hash Value? Pin
Dave Kreskowiak14-Apr-06 8:26
mveDave Kreskowiak14-Apr-06 8:26 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Brad6ft414-Apr-06 8:47
Brad6ft414-Apr-06 8:47 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Dave Kreskowiak14-Apr-06 9:28
mveDave Kreskowiak14-Apr-06 9:28 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Brad6ft417-Apr-06 4:42
Brad6ft417-Apr-06 4:42 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Dave Kreskowiak17-Apr-06 12:29
mveDave Kreskowiak17-Apr-06 12:29 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Brad6ft422-Apr-06 6:33
Brad6ft422-Apr-06 6:33 
Questionobjectdatasource has no values to insert Pin
dr S.A.f.14-Apr-06 2:43
dr S.A.f.14-Apr-06 2:43 
AnswerRe: objectdatasource has no values to insert Pin
Steve Pullan14-Apr-06 3:50
Steve Pullan14-Apr-06 3:50 
GeneralRe: objectdatasource has no values to insert Pin
dr S.A.f.14-Apr-06 8:20
dr S.A.f.14-Apr-06 8:20 
QuestionVb 6 and access 2000 in LAN Pin
arunendra14-Apr-06 2:11
arunendra14-Apr-06 2:11 
AnswerRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak14-Apr-06 3:34
mveDave Kreskowiak14-Apr-06 3:34 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra14-Apr-06 5:15
arunendra14-Apr-06 5:15 
GeneralRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak14-Apr-06 6:43
mveDave Kreskowiak14-Apr-06 6:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.