Re: MFC dll and exe porting to 64-bit
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Wed, 28 Nov 2007 11:06:35 -0500
See below...
Note that the absence of any code makes it hard to determine what is going on!
On Wed, 28 Nov 2007 07:25:03 -0800, Tailai Chen <TailaiChen@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Hi****
I had several MFC Dlls and EXEs (32bit was built in VC6) to be ported to
64-bit. I recompile them using PSDK and VC6 on a 64-bit XP SP2 (amd64)
development machine.
The problem is, when testing, although they all compiled and built fine, my
MFC exe was able to load the dll dynamically and can find the exported
functions, BUT the parameters passed when calling the exported function have
been messed up. The exported function CreateInstance(char*, char*, int,
char*) taking four parameters to create an instance of a dialog, and I got an
"Access violation - code c0000005 (first chance)" when debugging with WinDbg,
which clearly that certain parameters are not right.
You did not get an "access violation"; you got "an access violation in <module name here>"
and quite likely "at line <number>" which is the line "<text of line here>" and the
backtrace to your call site is "<backtrace here>". Lacking all this information, what we
can safely say is that you made an error in the conversion to 64-bit, but without this
information and you sample code of the DLL, the call, etc., we could not possibly guess
what has gone wrong.
****
****
So I went on created a sample MFC dll and exe trying to prove. I got an
unexpected results:
e.g. function included in dll print out the parameter it get, when passing
one int, it prints out 0 no matter what the number is, when passing two ints,
it prints out the first one right following a "2345667" which looks like part
of memory address, when passing three parameters, it prints out the first two
right with "3554345".
And in the absence of the code for this, we have NO IDEA what you did!
****
****
I tried regular dll, it works fine, so only to MFC dll
I know this may turn out to be a basic mistake, I will be appriciate that
someone could at least prove me wrong, then I can get my life going again.
Give us enough information to help, and we can try. Give us no information, as this post
has, and we haven't a chance
joe
****
Joseph M. Newcomer [MVP]
Thanks
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: MFC dll and exe porting to 64-bit
- From: Tailai Chen
- Re: MFC dll and exe porting to 64-bit
- Prev by Date: Re: Again with CAsyncSocket
- Next by Date: Re: sorting of text file
- Previous by thread: Microsoft's simple printer code won't work on Vista Home Premium, where do I go now?
- Next by thread: Re: MFC dll and exe porting to 64-bit
- Index(es):
Relevant Pages
|