The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: sonix on December 21, 2014, 07:28:59 AM

Title: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: sonix on December 21, 2014, 07:28:59 AM
Good evening to all,

  after building of a default (EasyCode) visual executable file project on a win7 64-bit OS the builded file does not run on the winXP 32-bit OS. After an application run nothing "visible" happens. When I untick in project properties UPX compression then I get on application startup error message "Procedure entry point RegCloseKey not found in dynamic link library kernel32.dll" and that's all.

  When I copy the whole project folder to the winXP OS and I simply run the build command the exe file is OK and it is runnable also on a win7 64-bit OS.

How can I fix this "behaviour"?

I would like to build the x86 applications in win7 64-bit environment that are runnable also on a winXP 32-bit OS.

I Am using:
-win7 64-bit ultimate
-winXP 32-bit professional
-EasyCode ver. 1.07.0.0001 GoAsm
-attached are example files of the EasyCode Visual project

-GoAsm.Exe ver. 0.58.0.0
-GoRC.exe ver. 1.0.0.0
-GoLink.exe ver. 0.28.0.0
+ included latest goasm headers from Donkey's Stable website

Thanks in advance

Best regards
sonix
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: dedndave on December 21, 2014, 07:52:58 AM
RegCloseKey is in AdvApi32.dll - not Kernel32.dll
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: dedndave on December 21, 2014, 07:55:03 AM
you want to make sure you INCLUDE advapi32.inc and INCLUDELIB advapi32.lib
not sure how that works in EasyCode, though   :P
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: sonix on December 21, 2014, 08:31:05 AM
Hi dedndave,

I have tried your suggestion and it did not help. By the way I found this in help fileEasyCode Goasm:

"
The Easy Code visual libraries, ECStcGo.lib or ECStcGou.lib for static linking and ECDllGo.dll or ECDllGou.dll for dynamic linking, are built in assembly language and manage the behavior of all of the objects built, including watching for tab stops, short cuts for menus, appearance, text and colours for objects, etc.. Besides these two libraries, Easy Code visual mode always includes the following files:

Includes:

windows.inc

Files to link:

gdi32.dll
kernel32.dll
user32.dll
advapi32.dll

So, you do not need to include these into your project. They will be ignored if you do so. Most projects will only require the above extra includes and dll's.
"

Have you any other idea ?

Best regards
sonix

you want to make sure you INCLUDE advapi32.inc and INCLUDELIB advapi32.lib
not sure how that works in EasyCode, though   :P
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: dedndave on December 21, 2014, 08:38:11 AM
maybe something wrong with the way the imports are built
Ramon will have to have a look at it
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: sonix on December 21, 2014, 08:47:43 AM
OK, thank you for a quick reply. I have now tried to build dynamically linked Easy Code library and the executable file is OK on win7 64-bit and also winXP 32-bit. So there is a problem only while building a visual project using the static Easy Code library.

maybe something wrong with the way the imports are built
Ramon will have to have a look at it
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: rsala on December 23, 2014, 07:14:11 AM
Hi Sonix,

Thanks for using Easy Code.

The point is that GoAsm uses the existing dll,s when it compiles a project (it does not use ".lib" files like Masm), so most of times a project built in a Windows version will not work in a Windows previous version. When you rebuild the project on XP, GoAsm uses the XP dll's and then it works. However, if you try to run that executable in a previous version of Windows (let's say Windows 2000) it (probably) will not run. I am sorry but I am afraid I can do nothing about that, it is the way how GoAsm works. I will have a look anyway.

If you try to do the same with the Masm version of Easy Code, it will work fine in all Windows platforms (Windows 95 included).

Best regards,

Ramon
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: rsala on December 23, 2014, 09:35:07 AM
Hi Sonix (and hi all),

I am sorry, I had never realized that the dynamic library worked fine (it must be because it dynamically loads the advapi32.dll entry points), so I will find out where the problem is (it seems to appear only for the advapi32.dll file). I am going to fix this by getting the entry points dynamically in the static libraries and I will get back to you.

Regards,

Ramon

Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: rsala on December 23, 2014, 10:37:03 AM
Hi all,

Well, it seems that the advapi32.dll entry points cause problems among Windows platforms, so now the static libraries attached (for GoAsm version) solve the problem.

Please replace the ''ECStcGo.lib" and ''ECStcGou.lib" files, in "\EasyCode.Go\Lib" folder, with those attached to this post. Thanks.

Sorry for the inconveniences,

Ramon
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: Gunther on December 23, 2014, 10:50:21 AM
Hi rsala,

thank you for your fast reaction.  :t

Gunther
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: rsala on December 23, 2014, 10:51:29 AM
 :t
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: sonix on December 24, 2014, 05:03:03 AM
Hi Ramon,

  thank you for your quick reply and also big thanks for your great EasyCode IDE.

I tested new libs and default visual project is already OK on both windows OS, but there is something else caused exception when I add some controls e.g. static control or button to the form and then run the builded executable.

  This exception is present whenever I build the executable on win7 64-bit OS also on winXP 32-bit (with replaced ECGo libs).

  I have attached 2 pictures of the exception. One with simple message box and the second one with little bit detailed info. And also temporary exception file generated by winXP while showing the message.

Can I do anything else for getting more debug info?

I wish to all a loveful Christmas days


Best regards
sonix

Hi all,

Well, it seems that the advapi32.dll entry points cause problems among Windows platforms, so now the static libraries attached (for GoAsm version) solve the problem.

Please replace the ''ECStcGo.lib" and ''ECStcGou.lib" files, in "\EasyCode.Go\Lib" folder, with those attached to this post. Thanks.

Sorry for the inconveniences,

Ramon
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: rsala on December 24, 2014, 06:46:12 AM
Hi Sonix,

Thanks for your kind words about Easy Code.

I have made a default visual project with a stactic and a button control and it runs with no exceptions on both, WIN7-64 and WINXP (I attach the test project working fine). Please make sure you have the latest version (1.07.0.0006, released yesterday) and then replace the two libraries with those I attached to this post yesterday.

The best way I have found to debug GoAsm projects is using the "GoBug" debugger.

Regards,

Ramon

Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: sonix on December 24, 2014, 07:27:34 AM
Hi Ramon,

  thanks for your reply. Today I am not able to access webpage www.easycode.cat .There is dns timeout also when I tried to test dns queries online from various internet servers. Therefore actually I can not give you feedback. I will try to download the latest version of EasyCode.Go tomorrow and I will let you know the result.

Many thanks for your kindly help.

Best regards
sonix

Hi Sonix,

Thanks for your kind words about Easy Code.

I have made a default visual project with a stactic and a button control and it runs with no exceptions on both, WIN7-64 and WINXP (I attach the test project working fine). Please make sure you have the latest version (1.07.0.0006, released yesterday) and then replace the two libraries with those I attached to this post yesterday.

The best way I have found to debug GoAsm projects is using the "GoBug" debugger.

Regards,

Ramon
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: sonix on December 25, 2014, 02:00:22 AM
Hi Ramon,

  today I have successfully build executable file with static EasyCode libs on win7 64-bit that is runnable on winXP and also on win98  :eusa_clap: So your last suggestion that I must build the exe with latest EasyCode was correct.

Thank you very much for your kindly help.

I wish to all a Merry Christmas and happy New Year

Best regards
sonix

Hi Ramon,

  thanks for your reply. Today I am not able to access webpage www.easycode.cat .There is dns timeout also when I tried to test dns queries online from various internet servers. Therefore actually I can not give you feedback. I will try to download the latest version of EasyCode.Go tomorrow and I will let you know the result.

Many thanks for your kindly help.

Best regards
sonix

Hi Sonix,

Thanks for your kind words about Easy Code.

I have made a default visual project with a stactic and a button control and it runs with no exceptions on both, WIN7-64 and WINXP (I attach the test project working fine). Please make sure you have the latest version (1.07.0.0006, released yesterday) and then replace the two libraries with those I attached to this post yesterday.

The best way I have found to debug GoAsm projects is using the "GoBug" debugger.

Regards,

Ramon
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: Gunther on December 25, 2014, 03:07:54 AM
I wish to all a Merry Christmas and happy New Year

The same for you.  :t

Gunther
Title: Re: x86 visual project builded on win7 64-bit not running on winXP 32-bit
Post by: rsala on December 25, 2014, 09:25:00 PM
Thank you very much Sonix, the same to you.

Merry Christmas to all!