Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Programming a microcontroller - sorry for length

Author
Message
wildbill
18
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 3rd Oct 2007 20:31
I have used several dlls, but this one is giving me some problems. If someone could help I would be grateful.

This is a section of the read me file, with just the first command.
I would like to return the pointer to use in other commands. Which I would assume I need to allocate memory?
========================================================================
DYNAMIC LINK LIBRARY : gp3.dll V1.0
========================================================================

This DLL provides a set of __stdcall functions you can use from any
language that allows you to call standard DLLs. This is useful for
C and C++ programmers and also VB programmers who want to use
DECLARE to work with the GP3.

Here are the functions provided (see the GP3 manual for more details):

HANDLE __stdcall GP3OpenCom(int port);
Open the GP3 port (for example, for COM1, set port=1). Handle is NULL
on failure. Otherwise save handle to pass to other routines.

__________
When I use Dependency Walker it says the function is _GP30OpenComm@4, I guess this is decorated?

I have attached the DLL if anyone needs it?

Attachments

Login to view attachments
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Oct 2007 22:28
Apart from your typo, yes, that's the decorated name. The stdcall call method will take your function name, add a leading underscore, then add an '@' symbol, and finally add a number which refers to the number of stack bytes used by the function (the 'int' argument is 4 bytes in size).

That particular function call doesn't need any memory allocated - it just returns a 'HANDLE', which is basically a 4 byte value that you can hold in an int or a dword. The other functions may or may not need memory allocated - can't tell with just the DLL.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
wildbill
18
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 3rd Oct 2007 22:55 Edited at: 3rd Oct 2007 22:56
Thanks for you reply. Right after I wrote this I looked closely at you Matrix Utility functions in particular number 20.

Login to post a reply

Server time is: 2024-11-22 22:06:33
Your offset time is: 2024-11-22 22:06:33