Click here to Skip to main content
15,887,812 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralNeed some direction Pin
Tom Wright23-Mar-05 9:55
Tom Wright23-Mar-05 9:55 
GeneralRe: Need some direction Pin
PJ Arends23-Mar-05 10:59
professionalPJ Arends23-Mar-05 10:59 
GeneralRe: Need some direction Pin
Tom Wright23-Mar-05 11:21
Tom Wright23-Mar-05 11:21 
Questionneed a tool (or api) that creates login attempts to an active directory domain?? Pin
vista2723-Mar-05 9:25
vista2723-Mar-05 9:25 
AnswerRe: need a tool (or api) that creates login attempts to an active directory domain?? Pin
Blake Miller23-Mar-05 11:43
Blake Miller23-Mar-05 11:43 
QuestionHow to detect Network Cable Unplug Events Pin
Paolo Ponzano23-Mar-05 8:36
Paolo Ponzano23-Mar-05 8:36 
AnswerRe: How to detect Network Cable Unplug Events Pin
David Crow23-Mar-05 9:45
David Crow23-Mar-05 9:45 
GeneralHardware list error Pin
brilliant10123-Mar-05 8:10
brilliant10123-Mar-05 8:10 
It is the code from MSDN
It complies and links but does not executes giving the following error
File:i386\chkesp.c
line:48
The value of ESP was not properly saved across a fuction call.This is usually a result of calling function decleared with one calling convention with a funciton pointer decleared with a different calling convention.

#include <windows.h>
#include <setupapi.h>
#include <stdio.h>

DWORD Err;

HDEVINFO DoDeviceEnum( GUID InterfaceClassGuid)
/*
Routine Description:
Retrieves the device information set that contains that contains
the devices of the specified class.

Parameters:
InterfaceClassGuid - The interface class GUID.

Return Value:
If the function succeeds, the return value is a handle to the
device information set.

If the function fails, the return value is zero.
*/
{
HDEVINFO DeviceInfoSet;
HDEVINFO NewDeviceInfoSet;

// Create a device information set that will be the container for
// the device interfaces.

DeviceInfoSet = SetupDiCreateDeviceInfoList(NULL, NULL);

if(DeviceInfoSet == INVALID_HANDLE_VALUE) {
Err = GetLastError();
printf( "SetupDiCreateDeviceInfoList failed: %lx.\n", Err );
return 0;
}

// Retrieve the device information set for the interface class.

NewDeviceInfoSet = SetupDiGetClassDevsEx(

&InterfaceClassGuid, // address of guid required

NULL, // no enumerator

NULL, // no parent window handle (might not be a good idea…)

DIGCF_PRESENT | DIGCF_DEVICEINTERFACE, // flags

//DeviceInfoSet, // do not pass this in, not in function prototype

NULL, // NULL implies local machine

NULL // Reserved’ must be null

);

if(NewDeviceInfoSet == INVALID_HANDLE_VALUE)
{
Err = GetLastError();
printf( "SetupDiGetClassDevsEx failed: %lx.\n", Err );
return 0;
}

return NewDeviceInfoSet;
}

int main(int argc, TCHAR* argv[])
{

GUID var;
DoDeviceEnum(var);

return 0;

}
GeneralRe: Hardware list error Pin
David Crow23-Mar-05 9:47
David Crow23-Mar-05 9:47 
GeneralSocket programming Pin
vinsankar23-Mar-05 6:55
vinsankar23-Mar-05 6:55 
GeneralRe: Socket programming Pin
greba23-Mar-05 7:44
greba23-Mar-05 7:44 
GeneralRe: Socket programming Pin
vinsankar23-Mar-05 21:44
vinsankar23-Mar-05 21:44 
GeneralHelp me debug MFC app that uses COM Pin
Budric B.23-Mar-05 6:18
Budric B.23-Mar-05 6:18 
GeneralCString class Pin
ddmcr23-Mar-05 6:13
ddmcr23-Mar-05 6:13 
GeneralRe: CString class Pin
Budric B.23-Mar-05 6:32
Budric B.23-Mar-05 6:32 
GeneralRe: CString class Pin
David Crow23-Mar-05 7:56
David Crow23-Mar-05 7:56 
GeneralRe: CString class Pin
toxcct23-Mar-05 8:37
toxcct23-Mar-05 8:37 
GeneralRe: CString class Pin
Michael Dunn23-Mar-05 14:23
sitebuilderMichael Dunn23-Mar-05 14:23 
GeneralEvents in MFC... Pin
anderslundsgard23-Mar-05 5:06
anderslundsgard23-Mar-05 5:06 
GeneralRe: Events in MFC... Pin
David Crow23-Mar-05 5:39
David Crow23-Mar-05 5:39 
GeneralRe: Events in MFC... Pin
anderslundsgard23-Mar-05 7:51
anderslundsgard23-Mar-05 7:51 
GeneralRe: Events in MFC... Pin
David Crow23-Mar-05 7:54
David Crow23-Mar-05 7:54 
GeneralRe: Events in MFC... Pin
Maximilien23-Mar-05 8:10
Maximilien23-Mar-05 8:10 
GeneralRe: Events in MFC... Pin
anderslundsgard23-Mar-05 9:39
anderslundsgard23-Mar-05 9:39 
GeneralRe: Events in MFC... Pin
PJ Arends23-Mar-05 11:03
professionalPJ Arends23-Mar-05 11:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.