24#define WIN32_NO_STATUS
67 int argc, nBSlash, nNames;
68 BOOL bInQuotes, bFirstChar;
79 while (*lpSrc ==
_T(
' ') || *lpSrc ==
_T(
'\t'))
98 if (*lpSrc == 0 || (*lpSrc ==
_T(
',') && nNames == 2) || ((*lpSrc ==
_T(
' ') || *lpSrc ==
_T(
'\t')) && !bInQuotes)) {
103 while (*lpSrc ==
_T(
' ') || *lpSrc ==
_T(
'\t') || (*lpSrc ==
_T(
',') && nNames == 2))
116 else if (*lpSrc ==
_T(
'\\')) {
121 else if (*lpSrc ==
_T(
'\"') && !(nBSlash & 1)) {
123 bInQuotes = !bInQuotes;
129 if (bFirstChar && ((*lpSrc !=
_T(
'/') && nNames <= 1) || nNames > 1))
156 if (*lpSrc == 0 || (*lpSrc ==
_T(
',') && nNames == 2) || ((*lpSrc ==
_T(
' ') || *lpSrc ==
_T(
'\t')) && !bInQuotes)) {
163 while (*lpSrc ==
_T(
' ') || *lpSrc ==
_T(
'\t') || (*lpSrc ==
_T(
',') && nNames == 2))
178 else if (*lpSrc ==
_T(
'\\')) {
179 *lpDest++ =
_T(
'\\');
186 else if (*lpSrc ==
_T(
'\"')) {
187 if (!(nBSlash & 1)) {
190 lpDest -= nBSlash / 2;
191 bInQuotes = !bInQuotes;
196 lpDest -= (nBSlash + 1) / 2;
197 *lpDest++ =
_T(
'\"');
205 if (bFirstChar && ((*lpSrc !=
_T(
'/') && nNames <= 1) || nNames > 1))
207 *lpDest++ = *lpSrc++;
226 if (*lpStr ==
_T(
'\\'))
245#define ConvertToWideChar(lptString) (lptString)
246#define FreeConvertedWideChar(lpwString)
254 nStrLen =
strlen(lpString) + 1;
262#define FreeConvertedWideChar(lpwString) free(lpwString)
272#define ConvertToMultiByte(lptString) DuplicateToMultiByte(lptString,0)
273#define FreeConvertedMultiByte(lpaString) free(lpaString)
275#define ConvertToMultiByte(lptString) (lptString)
276#define FreeConvertedMultiByte(lpaString)
290 nStrLen =
_tcslen(lptString) + 1;
291 if (nBufferSize == 0) nBufferSize = nStrLen;
297 strncpy(lpString,lptString,nBufferSize);
388 LPTSTR lptCmdLine,lptDllName,lptFuncName,lptMsgBuffer;
390 LPSTR lpFuncName,lpaCmdLine;
399 ACTCTXW
ActCtx = {
sizeof(ACTCTX), ACTCTX_FLAG_RESOURCE_NAME_VALID};
409 if (*
argv[
i] !=
_T(
'/'))
break;
417 lptDllName =
argv[
i++];
423 lptFuncName =
argv[
i++];
425 lptFuncName =
_T(
"");
435 lptCmdLine =
argv[
i];
439 lpManifestName = lptDllName;
445 lpManifestName = ResolvedFile;
450 ActCtx.lpSource = lpManifestName;
452 hActCtx = CreateActCtx(&
ActCtx);
458 nStrLen =
_tcslen(lptFuncName);
464 lpFuncName[nStrLen] =
'W';
465 lpFuncName[nStrLen+1] = 0;
469 if (!fnDllWinMainW) {
471 lpFuncName[nStrLen] =
'A';
473 if (!fnDllWinMainA) {
476 lpFuncName[nStrLen] = 0;
484 if (!fnDllWinMainA) {
487 lpFuncName[nStrLen] =
'A';
488 lpFuncName[nStrLen+1] = 0;
490 if (!fnDllWinMainA) {
492 lpFuncName[nStrLen] =
'W';
509 hWindow =
CreateWindowEx(0,
rundll32_wclass,
rundll32_wtitle,0,
CW_USEDEFAULT,0,
CW_USEDEFAULT,0,0,0,
hInstance,0);
514 fnDllWinMainW(hWindow,
hInstance,lpwCmdLine,nCmdShow);
517 else if (fnDllWinMainA) {
520 fnDllWinMainA(hWindow,
hInstance,lpaCmdLine,nCmdShow);
529 _stprintf(lptMsgBuffer,szMsg,lptFuncName,lptDllName);
546 _stprintf(lptMsgBuffer,szMsg,lptDllName);
ACPI_SIZE strlen(const char *String)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
#define RC_STRING_MAX_SIZE
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_In_ PCWSTR _Out_ PVOID * ActCtx
#define CommandLineToArgv
static BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
struct FIND_OWNED * PFIND_OWNED
int(WINAPI * DllWinMainA)(HWND hWnd, HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow)
#define FreeConvertedWideChar(lpwString)
TCHAR ModuleFileName[MAX_PATH+1]
LRESULT CALLBACK EmptyWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
int(WINAPI * DllWinMainW)(HWND hWnd, HINSTANCE hInstance, LPWSTR lpwCmdLine, int nCmdShow)
BOOL RegisterBlankClass(HINSTANCE hInstance, HINSTANCE hPrevInstance)
LPSTR DuplicateToMultiByte(LPCTSTR lptString, size_t nBufferSize)
LPWSTR ConvertToWideChar(LPCSTR lpString)
void GetModuleTitle(void)
#define ConvertToMultiByte(lptString)
#define FreeConvertedMultiByte(lpaString)
#define WM_POPUPSYSTEMMENU
#define INVALID_FILE_ATTRIBUTES
#define GetModuleFileName
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
HWND WINAPI SetActiveWindow(_In_ HWND)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)