Re: Problem with Declare or dll

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




<Jeffery> wrote in message news:uIHFhXafGHA.3488@xxxxxxxxxxxxxxxxxxxxxxx
Hi group,
I want to use a library file in my vb program. The library file EdrLib.dll
has been copied to the vb project directory. (this library is taken from
Petzold's Windows Programming Chapter 21).

I then added a declare statement as follows

Public Declare Sub EdrCenterTextA Lib "EdrLib.dll" _
(ByVal a As Long, _
ByVal a1 As Long, _
ByVal a2 As Long)

a,a1,a2 are pointers, so - long - in vb.

Now, when I call the function from my form I get this error message:

Run time error 453
Can't find dll entry point EdrCenterTextA in Edrlib.dll

Any ideas?


Don't have that book around here.

Publish the exported signature of the function as well as the .def file
definition.

In the meantime check the spelling of the function and provide a full path
for the library - eg, instead of "EdrLib.dll", use
"c:\vbproject\edrlib.dll".

-ralph


.



Relevant Pages

  • Problem with Declare or dll
    ... I want to use a library file in my vb program. ... Public Declare Sub EdrCenterTextA Lib "EdrLib.dll" _ ... when I call the function from my form I get this error message: ...
    (microsoft.public.vb.general.discussion)
  • Re: fatal error LNK1104: cannot open file mfc71.lib
    ... You are trying to link in a .lib file that was compiled under VS.NET 2003. ... matter how many files are in the project, it matters what libraries you are trying to link ... You might also have an explicit path to a library file somewhere. ... I now get this error message when linking: ...
    (microsoft.public.vc.mfc)
  • Re: Anyone using Masm32 with Direct3D?
    ... > I converted vertices.cpp from the DX SDK Tutorials to assembly. ... > error message during linking: cannot open file ... > What is this library file? ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: linking problem in DPAPI
    ... and I stilll get the same error message. ... > nor in any other library file in that directory. ... > However, 'CryptProtectData' is in Windows/system32/crypt32.dll. ...
    (comp.lang.ada)
  • Re: With Micro-Cap to call a model ?
    ... I used Micro-Cap9, the good demo version simulateur of Spectrum. ... What is the error message you are getting? ... Wordpad appended the .TXT extension automatically so it was unable to ... library file this may be the reason. ...
    (sci.electronics.cad)