Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Allocation - Marshal ??
Message
From
28/06/2006 10:27:28
 
 
To
28/06/2006 08:46:26
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows NT
Miscellaneous
Thread ID:
01116042
Message ID:
01132393
Views:
26
This message has been marked as the solution to the initial question of the thread.
Hello,

"Thanks very much for your reply.
I still have no experience using C, is the creation of this FLL complicated ?"

Here's a step by step guide:

-start Visual Studio
-create a new project -> Visual C++ Project with the "Win32 Project" template.
in the next screen choose "DLL" as the application type and enable
the "Empty project" checkbox.
-create a file called gdihelper.cpp (or whatever you wanna call it) and copy & paste the code from my last post into it ..
-add the file to the project under the "Source Files" project tree

set the following project settings (rightclick on the topnode with the name of your project in the project tree and select "Properties" from the context menu)

for the "Debug" configuration:
C/C++ -> Code Generation -> Runtime Library -> Multi-threaded debug DLL (/MDD)
C/C++ -> Advanced -> Compile As -> Compile as C++ Code
C/C++ -> General -> Detect 64-bit Portability Issues -> No
Linker -> General -> Output file -> $(OutDir)/gdihelperd.fll
Linker -> Input -> Additional dependencies -> winapims.lib
Linker -> Input -> Ignore specific libraries -> msvcrt

for the "Release" configuration:
C/C++ -> Code Generation -> Runtime Library -> Multi-threaded DLL (/MD)
C/C++ -> Advanced -> Compile As -> Compile as C++ Code
C/C++ -> General -> Detect 64-bit Portability Issues -> No
Linker -> General -> Output file -> $(OutDir)/gdihelper.fll
Linker -> Input -> Additional dependencies -> winapims.lib


the "winapims.lib" file is shipped with FoxPro (FoxInstallPath\Samples\API), the easist way to make it visible to Visual Studio is by just copying it into the following directory "VSInstallPath\VC7\lib".

the "pro_ext.h" file is also needed by Visual Studio, it's in the same path as winapims.lib but you have to copy this one to "VSInstallPath\VC7\include"

after that you can finally build the DLL from the "Build" menu :)

Make sure you distribute the "Release" version of the FLL.
Also depending on which version of Visual Studio you're using to compile the FLL you have to ship the MSVCRT runtime DLL - msvcrt71.dll for VS 2003 or
msvcrt81.dll (not 100% sure) for VS 2005. It doesn't have to be registered in any form, putting it into the application directory is the recommend distribution method.

"The truth is that this could be used as an add-on to help the usage of some functions , "LockBits", "UnlockBits", "BitmapData" that permit manipulating the image directly, and maybe could be added or work together with the new GDI+ classes that Bo and Craig are creating.
If you have interest, I can send you an example."

Sounds interesting, so why not.

Regards
Christian

"Revenge ? Everybody wants revenge from Brazil :-)))
Unfortunately for you, I hope, not this year.
Friday you'll have the most difficult match, I think."

Yes, Argentinia is a tough opponent, they played impressivly in the groups round. Before the tournament began I actually wouldn't have make a bet on the german team, but they positivly surprised me in the last matches.
"We'll see" (schaun mer mal) like Beckenbauer would say :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform