Click here to Skip to main content
15,894,362 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, let me to ask for help.

I have a Win32 window that has a button.

If I click on the button the program automatically creates native window DLL via Microsoft or another compiler like for example Ming.

The DLL will be created from a file MyDLL.cpp format.

Is this below correct ?

SHELLEXECUTEINFO ShExecInfo;
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = NULL;
ShExecInfo.hwnd = hWnd;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\VsDevCmd.bat";
ShExecInfo.lpParameters = "cl.exe /D_USRDLL /D_WINDLL C:\\MyDLL.cpp C:\\MyDLL.def /link /DLL /OUT:MyDLL.dll";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_MAXIMIZE;
ShExecInfo.hInstApp = NULL;

ShellExecuteEx(&ShExecInfo);

Thank you !
Posted
Updated 27-Apr-15 10:06am
v3

You misunderstood the concept of a dll. It is a binaries which provides some functionality. For that you write code which gets in the dll and is executed by dll loading app.

Read here some Microsoft documentation about dll.

If you want to batch build a dll project you take a dive into the platform tools of Microsoft.
 
Share this answer
 
Couple of things.

1) What is a "standard window DLL" - if you mean a native DLL file, then that's just a case of using the command line to compile and link your source to a DLL.

2) Why would anything be created from a TXT file? What happens if there are compilation problems?

3) And finally, it doesn't quite work like that.
We do not do your work for you.
If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there. But be aware: you get what you pay for. Pay peanuts, get monkeys.
 
Share this answer
 
Comments
Mohibur Rashid 14-Apr-15 7:16am    
If i get monkey by paying peanut, i would start that business. By the catching monkey is not an option
OriginalGriff 14-Apr-15 7:23am    
Do you want monkeys writing your code? Remember an infinite number of peanuts is still going to add up to a significant cost!
Mohibur Rashid 14-Apr-15 8:30am    
I was thinking of getting monkey for peanut to sell :D
I am not expecting monkey to write my code :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900