Article View: borland.public.cppbuilder.nativeapi
Article #11785WlxDialogBox and GINA stub...
From: Mike Collins
Date: Wed, 14 Jan 2004 12:37
Date: Wed, 14 Jan 2004 12:37
55 lines
3319 bytes
3319 bytes
Hi all, been making a few posts over the last few days regarding developing
a GINA Stub in C++Builder. Starting to get there now but stuck with a small
problem relating to the WlxDialogBox. Created a demo application to test
and debug the dialog template using the DialogBox api call. Was having
problems with the api not being able to find the resource, turns out (as
pointed out by Remy) that I was passing the wrong handles.
Now I'm getting the same problem with the WlxDialogBox call. The dialog
resource template is definatly being compiled into my new Gina.dll.
According to the documentation:
int WlxDialogBox(HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND
hwndOwner, DLGPROC dlgprc);
where:
hWlx [in] Specifies the Winlogon handle passed to GINA in the WlxInitialize
call.
hInst [in] Specifies an instance of the module whose executable file
contains the dialog box template.
lpszTemplate [in] Specifies the dialog box template. This parameter is
either the address of a null-terminated character string that specifies the
name of the dialog box template, or an integer value that specifies the
resource identifier of the dialog box template. If the parameter specifies a
resource identifier, its high-order word must be zero and its low-order word
must contain the identifier. hwndOwner [in] Specifies the window that owns
the dialog box.
dlgprc [in] Points to the dialog box procedure.
Now I'm calling WlxDialogBox thus:
if (pWlxFuncs->WlxDialogBox(hWinLogon, hinst,
(LPWSTR)"IDD_CUSTOM_WELCOME_DIALOG",
NULL, (DLGPROC)DialogFunc)
== -1)
{
ShowMessage(SysErrorMessage(GetLastError()).c_str());
}
where hWinLogon is the correct handle passed to my gina through
WlxInitialize and hinst is the value passed to DllEntryPoint().
However I still get the same error message stating: "The specified image
file did not contain a resource section". Last time I received this message
was when using the DialogBox api and resulted from passing it the wrong
handle. Now I've tried changing "hInst" Handle value from hInst to
HInstance to Application->Handle but no joy. The documentation defines this
as a HNADLE where as DllEntryPoint has it passed as HINSTANCE.
Completely baffled,
Any help would be excellent - having to reboot every two minutes to test is
starting to grind :-)
Mike C
Technical Details
Message-ID:
<400534cd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5bc05edd06bcd13c,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-14 04:39:41 PST Reply-To: "Mike Collins" <mikec@kr8.co.uk> From: "Mike Collins" <mikec@kr8.co.uk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: WlxDialogBox and GINA stub... Date: Wed, 14 Jan 2004 12:37:26 -0000 Lines: 57 Organization: kr8 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.2.78.34 Message-ID: <400534cd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1074083021 81.2.78.34 (14 Jan 2004 04:23:41 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail