-1

I have the library called Serial.dll that containts the file Serial.def that looks like this:

EXPORTS
    ValidateSerial
    GenerateSerial

I want to import the function GenerateSerial in my C++ Win32 application. I searched on the internet topics about using DLLs but I can't get the idea... Can anybody help me?

Victor
  • 13,914
  • 19
  • 78
  • 147
  • Three things: 1. include the header, 2. link against the .lib, 3. put the .dll into your program's working directory. – Marius Jun 26 '13 at 14:32
  • [This will give you info, what you looking for](http://stackoverflow.com/questions/1922580/import-a-dll-with-c-win32) – ST3 Jun 26 '13 at 14:34
  • http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx – John b Jun 26 '13 at 14:47

1 Answers1

1

The info you provided only tells two funciton names. You can obtain their address doing LoadLibrary and GetProcAddress. But to make any use of them you need to know the proper signature, and the rules for the arguments and return values.

Without documentation (or a .h file) you can't go very far.

Balog Pal
  • 16,195
  • 2
  • 23
  • 37