![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi Leslie, Based on my understanding, you should be able to compile your C# Windows Forms control library using targetd platform "AnyCPU". This is the also default platform type, assemblied compiled in this way is process independent. If it's executed or loaded by 32-bit os or host process, it will be JIT(just-in-time) compiled as 32-bit native code; and the same for 64-bit. For your C++ DLL, you have to compile two versions, one for 32-bit, will be installed to %windir%\syswow64 on 64-bit os, installed to %windir%\system32 on 32-bit os. For 64-bit version, install to %windir%\system32. Hope this helps. Regards, Walter Wang (wawang (AT) online (DOT) microsoft.com, remove 'online.') Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#4
| |||
| |||
|
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Hi Leslie, I was wondering how's currently you're download the C++ DLL and where is it installed to? There's one possible solution to this is to use dynamic P/Invoke to load different versions of the DLL according to 32-bit or 64-bit environment that the control is running in. You can determine this by checking IntPtr.Size, if it's equal to 4, it's 32-bit, if it's equal to 8, it's 64-bit. #Junfeng Zhang's Windows Programming Notes : Dynamic PInvoke http://blogs.msdn.com/junfeng/archiv...14/181932.aspx Please feel free to let me know if there's anything unclear. Thanks. Regards, Walter Wang (wawang (AT) online (DOT) microsoft.com, remove 'online.') Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Hi Leslie, So the C++ dll is a managed assembly built with C++/CLI, right? If this is the case, you can try to use /clr:safe switch to generate safe IL code of the C++ managed assembly. In this case, the generated IL code is also processor independent, which means it will also be JIT compiled as 32-bit or 64-bit native code according to the host process. I have a related discussion here for your reference: http://msdn.microsoft.com/newsgroups...icrosoft.publi c.dotnet.framework.windowsforms.controls&tid=6e96e bc9-5507-425a-a27b-0950d94 a3584&m=1&p=1 Regards, Walter Wang (wawang (AT) online (DOT) microsoft.com, remove 'online.') Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |