The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: dszk on August 04, 2010, 08:57:23 AM

Title: mfc vc6 to assembler running fault
Post by: dszk on August 04, 2010, 08:57:23 AM
Hi:
I want to use .asm source code to encrypt my C++(with MFC) source code. (only In front of primary people)

Firstly: The project is made by vc6 mfc dialog guide,it's a simple demo. I was used vc6 cl.exe with /FAs and other options to output .asm source file at the same time to build 32bit windows PE file with static MFC library,this step is not controversy.

Secondly I used ml.exe(v6.14[in masm32] or v6.15[in vcpp]) to compile these .asm file and link them to PE file. I want to get the same about vc6 result.But that is an exception throw while running .exe build from .asm,I used debug to trace into MFC code,it's happened while "if (!pThread->InitInstance())" preforming,because the pThread  == NULL,and the above sentence "CWinThread* pThread = AfxGetThread();" were not get the pThread.

Thirdly I used dynamic MFC library to build, still failed.

Fourthly I built None MFC win32 api dlg application from vc6 guide.preform the same step by "cl.exe(ouput .asm) -> ml.exe -> link.exe",the .exe file can be run OK!

Now how do I put the cpp to asm with MFC libaray? May be to add some MFC macros?
I want to attach my Project by winrar size 2.62M. The limit size 256k, if require post you Mail addr, I send to you.
please help me!