Hello All,
I thought it would be easy replacing main() by WinMain()...
I need to do this because of a limitation in the number of arguments you can
pass with main (I assume that WinMain is not limited). I want to be able to
drop a huge number of files on my app and process them. But how do you read
the command line parameters from WinMain ?
This page ( http://msdn2.microsoft.com/en-us/library/ms647232.aspx ) says to
use:
#include <windows.h>
#include <shellapi.h> // ?
#include <cvirte.h> ...
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpszCmdLine, int nCmdShow) {
if (InitCVIRTE (hInstance, 0, 0) == 0) return -1;
Argv = CommandLineToArgvW(GetCommandLineW(), &Argc);
But then the linker fails with:
Undefined symbol '_CommandLineToArgvW@8' referenced in "ImageRenamer.c".
What's missing from the linkage ?
--
Guillaume Dargaud
http://www.gdargaud.net/Climbing/