Access violation masc.dll
From: Martin (kung_nolle_at_hotmail.com)
Date: 01/14/05
- Next message: Tom de Neef: "Re: Access violation masc.dll"
- Previous message: Marco van de Voort: "Re: How can I change/remap keys from inside my keyboard hook? (I've been searching all day...)"
- Next in thread: Tom de Neef: "Re: Access violation masc.dll"
- Reply: Tom de Neef: "Re: Access violation masc.dll"
- Reply: DaveTV: "Re: Access violation masc.dll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Jan 2005 02:38:40 -0800
Hi,
I'm writing an application to test Mobitex and the MASC protocol. I've
decided to use an dll(masc.dll). The MASC DLL is a Windows DLL that
implements the MASC protocol, allowing applications that have no
knowledge of MASC to communicate with Mobitex modems.
I'm using Delphi and has converted masc.h (written in C/C++) to
delphicode. When I call a method I get the following message: 'Access
violation att address 10001029 in module masc.dll'. Read of address
00000000'.
This is the method I tried to call
Defintion in masc.h
EXPORT int CALLBACK MASC_Open(HMASC* hMASC, char* address,
MASC_SETTINGS* settings, unsigned long timeout);
Definition in Delphi
function MASC_Open(hMASC :HMASC; address: PChar;
settings:MASC_SETTINGS; Timeout: LongInt):integer; cdecl; external
MASCDLL;
My call to MASC_Open in the code:
status := MASC_Open(hMasc, address, settings, 0);
Declaration HMASC, MASC_SETTINGS
HMASC: In masc.h typedef void*
in delphi HMASC=pointer;
MASC_SETTINGS In masc.h typedef struct
{
unsigned int frameQueueSize;
unsigned int commandQueueSize;
unsigned int mpakQueueSize;
}
in delphi type
MASC_SETTINGS = record
frameQueueSize :cardinal;
mpakQueueSize :cardinal;
commandQueueSize :cardinal;
end{MASC_SETTINGS};
I'm not very familiar with c/c++ and pointers so I wouldn't be
surprised if the explanation to the "access violation" lies in the
conversion of different data types and pointers.
Please help if you can, I'm stuck...
Martin
pointers from c/c++ to delphi.
- Next message: Tom de Neef: "Re: Access violation masc.dll"
- Previous message: Marco van de Voort: "Re: How can I change/remap keys from inside my keyboard hook? (I've been searching all day...)"
- Next in thread: Tom de Neef: "Re: Access violation masc.dll"
- Reply: Tom de Neef: "Re: Access violation masc.dll"
- Reply: DaveTV: "Re: Access violation masc.dll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|