From: Joel Whitehouse on
Hi Guys,

I have a project that declares several functions from multiple .dlls,
including a few user32 APIs, and functions from a 3rd party .dll.

My trouble comes when I try to declare functions from a .dll file that I
wrote in VC7. Whenever I run a line of code that calls my library
"MastController.dll", I get the following:

"Run-time Error 53: File not found: C:\Program Files\Microsoft Visual
Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController"

My declare statement looks like this:

Public Declare Function MastMove Lib "C:\Program Files\Microsoft Visual
Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController.dll"
Alias "Move" (ByVal hWnd As Long, ByVal Msg As Long, ByVal nAzimuth As
Long, ByVal nElevation As Long) As Integer

Like I say, *other* .dlls that I'm using are working porperly, and I was
even able to get a VC7 driver to test the functions of MastController.dll.

I also tried placing MastController.dll in app.path and the system32
directories, as well as the vb6.exe directory and using a declare
statement without a path, but I get eth same result.

What am I doing wrong?

-Joel Whitehouse
From: Ralph on


"Joel Whitehouse" wrote:

> Hi Guys,
>
> I have a project that declares several functions from multiple .dlls,
> including a few user32 APIs, and functions from a 3rd party .dll.
>
> My trouble comes when I try to declare functions from a .dll file that I
> wrote in VC7. Whenever I run a line of code that calls my library
> "MastController.dll", I get the following:
>
> "Run-time Error 53: File not found: C:\Program Files\Microsoft Visual
> Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController"
>
> My declare statement looks like this:
>
> Public Declare Function MastMove Lib "C:\Program Files\Microsoft Visual
> Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController.dll"
> Alias "Move" (ByVal hWnd As Long, ByVal Msg As Long, ByVal nAzimuth As
> Long, ByVal nElevation As Long) As Integer
>
> Like I say, *other* .dlls that I'm using are working porperly, and I was
> even able to get a VC7 driver to test the functions of MastController.dll.
>
> I also tried placing MastController.dll in app.path and the system32
> directories, as well as the vb6.exe directory and using a declare
> statement without a path, but I get eth same result.
>
> What am I doing wrong?
>
> -Joel Whitehouse
>

It is all on one line or you are using the line-continuation character '_'?
From: Joel Whitehouse on
Ralph wrote:

>
> "Joel Whitehouse" wrote:
>
>
>>Hi Guys,
>>
>>I have a project that declares several functions from multiple .dlls,
>>including a few user32 APIs, and functions from a 3rd party .dll.
>>
>>My trouble comes when I try to declare functions from a .dll file that I
>>wrote in VC7. Whenever I run a line of code that calls my library
>>"MastController.dll", I get the following:
>>
>>"Run-time Error 53: File not found: C:\Program Files\Microsoft Visual
>>Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController"
>>
>>My declare statement looks like this:
>>
>>Public Declare Function MastMove Lib "C:\Program Files\Microsoft Visual
>>Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController.dll"
>>Alias "Move" (ByVal hWnd As Long, ByVal Msg As Long, ByVal nAzimuth As
>>Long, ByVal nElevation As Long) As Integer
>>
>>Like I say, *other* .dlls that I'm using are working porperly, and I was
>>even able to get a VC7 driver to test the functions of MastController.dll.
>>
>>I also tried placing MastController.dll in app.path and the system32
>>directories, as well as the vb6.exe directory and using a declare
>>statement without a path, but I get eth same result.
>>
>>What am I doing wrong?
>>
>>-Joel Whitehouse
>>
>
>
> It is all on one line or you are using the line-continuation character '_'?

It's all on one line. Should I break the line up?

-Joel
From: Ralph on


"Joel Whitehouse" wrote:

> Ralph wrote:
>
> >
> > "Joel Whitehouse" wrote:
> >
> >
> >>Hi Guys,
> >>
> >>I have a project that declares several functions from multiple .dlls,
> >>including a few user32 APIs, and functions from a 3rd party .dll.
> >>
> >>My trouble comes when I try to declare functions from a .dll file that I
> >>wrote in VC7. Whenever I run a line of code that calls my library
> >>"MastController.dll", I get the following:
> >>
> >>"Run-time Error 53: File not found: C:\Program Files\Microsoft Visual
> >>Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController"
> >>
> >>My declare statement looks like this:
> >>
> >>Public Declare Function MastMove Lib "C:\Program Files\Microsoft Visual
> >>Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController.dll"
> >>Alias "Move" (ByVal hWnd As Long, ByVal Msg As Long, ByVal nAzimuth As
> >>Long, ByVal nElevation As Long) As Integer
> >>
> >>Like I say, *other* .dlls that I'm using are working porperly, and I was
> >>even able to get a VC7 driver to test the functions of MastController.dll.
> >>
> >>I also tried placing MastController.dll in app.path and the system32
> >>directories, as well as the vb6.exe directory and using a declare
> >>statement without a path, but I get eth same result.
> >>
> >>What am I doing wrong?
> >>
> >>-Joel Whitehouse
> >>
> >
> >
> > It is all on one line or you are using the line-continuation character '_'?
>
> It's all on one line. Should I break the line up?
>
> -Joel
>

No. I was just fishing... I've done that to myself before.

It sounds like you have it covered...
Spelling is correct?
Location is correct?
DLL is a regular DLL with the function exported?
Function name is spelled correctly?

One thing to try (when all else fails) is to punt (reboot). <g>
Clean the project up - Remove any possible reference to the dll in your
project. Remove all other possible "Declare" directives to that library.
Place the DLL in your app directory or anywhere there is a simple 'path' to
it (just to keep it simple while testing).
Close and save the project. Delete all temp files, and reboot.

you never know...
and besides it will give you the feeling you are doing something useful. <g>

-ralph

From: Joel Whitehouse on
Ralph wrote:

>
> "Joel Whitehouse" wrote:
>
>
>>Ralph wrote:
>>
>>
>>>"Joel Whitehouse" wrote:
>>>
>>>
>>>
>>>>Hi Guys,
>>>>
>>>>I have a project that declares several functions from multiple .dlls,
>>>>including a few user32 APIs, and functions from a 3rd party .dll.
>>>>
>>>>My trouble comes when I try to declare functions from a .dll file that I
>>>>wrote in VC7. Whenever I run a line of code that calls my library
>>>>"MastController.dll", I get the following:
>>>>
>>>>"Run-time Error 53: File not found: C:\Program Files\Microsoft Visual
>>>>Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController"
>>>>
>>>>My declare statement looks like this:
>>>>
>>>>Public Declare Function MastMove Lib "C:\Program Files\Microsoft Visual
>>>>Studio\MyProjects\MastCont\MastControllerTest\Debug\MastController.dll"
>>>>Alias "Move" (ByVal hWnd As Long, ByVal Msg As Long, ByVal nAzimuth As
>>>>Long, ByVal nElevation As Long) As Integer
>>>>
>>>>Like I say, *other* .dlls that I'm using are working porperly, and I was
>>>>even able to get a VC7 driver to test the functions of MastController.dll.
>>>>
>>>>I also tried placing MastController.dll in app.path and the system32
>>>>directories, as well as the vb6.exe directory and using a declare
>>>>statement without a path, but I get eth same result.
>>>>
>>>>What am I doing wrong?
>>>>
>>>>-Joel Whitehouse
>>>>
>>>
>>>
>>>It is all on one line or you are using the line-continuation character '_'?
>>
>>It's all on one line. Should I break the line up?
>>
>>-Joel
>>
>
>
> No. I was just fishing... I've done that to myself before.
>
> It sounds like you have it covered...
> Spelling is correct?
> Location is correct?
> DLL is a regular DLL with the function exported?
> Function name is spelled correctly?
>
> One thing to try (when all else fails) is to punt (reboot). <g>
> Clean the project up - Remove any possible reference to the dll in your
> project. Remove all other possible "Declare" directives to that library.
> Place the DLL in your app directory or anywhere there is a simple 'path' to
> it (just to keep it simple while testing).
> Close and save the project. Delete all temp files, and reboot.
>
> you never know...
> and besides it will give you the feeling you are doing something useful. <g>
>
> -ralph
>
Thanks Ralph, I'll give a try. *Starts to feel useful again...*

-Joel
 |  Next  |  Last
Pages: 1 2
Prev: Updating
Next: Please HELP ! HELP ! HELP !!!! [OCX]