Author |
Topic  |
|
newuser_ca
70 Posts |
|
Penn
China
644 Posts |
Posted - 06/05/2012 : 05:30:04 AM
|
Hi,
Please refer to this page.
Penn |
 |
|
newuser_ca
70 Posts |
Posted - 06/05/2012 : 11:16:52 AM
|
Thank you for the reply.
I followed the instruction in the link you gave me and created a simple dialog in VC 2010 and built welcome.dll. I got the following error in Origin 8.6(in win7):
"Load Library Failed C:\USER\ORIGIN\DOCUMENTS\ORIGINLAB\86\USER FILES\ORIGINC\WELCOME.DLL Error 193 %1 is not a valid Win32 application."
This error occurred at line: int nRet = Dialog::DoModal(hParent);
If I used it in Version 8.5 (in Win7), it is a different error: "Load Library Failed C:\USER\ORIGIN\DOCUMENTS\ORIGINLAB\86\USER FILES\ORIGINC\PROJECTTEMP\WELCOME.DLL Error 126 The specified module or a dependent could not be found."
Can you tell me what is wrong? I can send you the VC project and Origin C codes if possible. Thanks. |
Edited by - newuser_ca on 06/05/2012 3:52:15 PM |
 |
|
Penn
China
644 Posts |
Posted - 06/05/2012 : 11:32:06 PM
|
Hi,
I can see the first problem in 64 bit Origin 8.6. However, it is fine in 32 bit Origin 8.6. You can try with 32 bit version.
With the same dll, header file and the text Origin C code, it works fine in Origin 8.5.
Better that you can send us your code. You can click Send File to Tech support link in the top-right corner of the forum to send us your files.
Penn |
 |
|
newuser_ca
70 Posts |
Posted - 06/06/2012 : 09:52:18 AM
|
I already sent email to tech support team.
I mentioned that I tried it in Version 8.5 (which I believe it is 32 bit). I got different error. "Load Library Failed C:\USER\ORIGIN\DOCUMENTS\ORIGINLAB\86\USER FILES\ORIGINC\PROJECTTEMP\WELCOME.DLL Error 126 The specified module or a dependent could not be found."
I forgot to mention one thing.
I include the "resource.h" in my Origin C code: #include "C:\Users\origin\Documents\OriginLab\86\User Files\OriginC\resource.h"
when I right clicked and opened the file, this header file was not readable. see attached pic.

But I have no problem to read "resource.h" file with other editor like notepad.
I opened the file with Notepad and copied it over to Origin Code Builder window. Then it became readable. I don't know why Origin can't read it. Does this matter? |
 |
|
Penn
China
644 Posts |
Posted - 06/06/2012 : 8:53:33 PM
|
Hi,
The resource.h file problem is a known bug. Yes, you need to copy and paste it to overwrite the un-readable code.
Penn |
 |
|
greg
USA
1379 Posts |
Posted - 06/07/2012 : 12:35:11 PM
|
quote: I followed the instruction in the link you gave me and created a simple dialog in VC 2010 and built welcome.dll. I got the following error in Origin 8.6(in win7):
"Load Library Failed C:\USER\ORIGIN\DOCUMENTS\ORIGINLAB\86\USER FILES\ORIGINC\WELCOME.DLL Error 193 %1 is not a valid Win32 application."
This error occurred at line: int nRet = Dialog::DoModal(hParent);
In VC2010, select Project : Properties In "Configuration Properties\Linker\Advanced" set "No Entry Point" to Yes (/NOENTRY)
This makes the DLL a resource only DLL and Windows does not attempt to run anything when loading. |
 |
|
newuser_ca
70 Posts |
Posted - 06/07/2012 : 1:26:41 PM
|
Hi Greg,
Your solution didn't work out for me. I got the same error.
Penn gave me another solution and it worked. What he did was to change the VC2010 setting to 64 bits. See attached pic.
Thank you all for the help.
 |
 |
|
|
Topic  |
|