|
-
Nov 25th, 2008, 05:04 PM
#1
Thread Starter
Lively Member
[RESOLVED] Problem with running project (runs OK from complied .exe)
Hi,
I am writing code for a project that makes numerous calls to a .dll written in C++.
I have come across a strange problem where the app behaves differently when running from the compiled .exe to when running from the project.
I'm calling the function from the .dll
Code:
Private Declare Function HaxAnim_getFrameForStage Lib "HaxMio.dll" (ByVal haxAnim As Long, ByVal Stage As Integer) As Integer
I realise that this is pretty meaningless to anyone but me, as I'm the only person with the dll!!
The problem I'm having is that if I run from within VB and send meaningful values to haxAnim and Stage, I get -1 returned (which means there is an error - it should always return an Integer greater than 0). However when I run it from the compiled .exe the function returns the expected value.
The main problem is that I can't debug the .dll in C++, because I can only debug the .dll when I run the VB project from an executable, and because the executable is working fine, that's no help!
I'm just wondering if anyone has any ideas why running a project from VB would get different results to running the .exe. Surely they should be exactly the same???
If anyone has any suggestions to why this is happening, it would be much appreciated.
thanks
Paul
-
Nov 25th, 2008, 07:03 PM
#2
Re: Problem with running project (runs OK from complied .exe)
The program you run in the IDE is quite different that that, you get compiled. Just think on it, for example, how the hell the VB IDE can catch and display (and debug) you an errorenous line? In a compiled exe isn't that easy, also theres no program lines in compiled apps 
My oppinioon is, that you didnt properly configured the dll you are about to use. Its better to consult the help or developers, they will give you some tips and recommendations about usage.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|