|
You need to use the EventID and SourceName members of the EVENTLOGRECORD structure to locate the file containg the description strings.
As a side exercise, you may want to scan the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application registry key for the EventMessageFile value. This value indicates the name of the file containing the various descriptions you see in Event Viewer.
Lastly, take a look at this article, especially the ShowEventData() function.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Is there some reason you recommnded the registry ControlSet001 instead of CurrentControlSet?
Just curious...
|
|
|
|
|
No reason other than it was the first key I came to that had the EventMessageFile value.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi:
I have tried to insert 600 columns in the list control each of width of 70 ,only about 409 columns headers appear in the list ? any suggestions..
|
|
|
|
|
I would sure hate to have to navigate that many columns. Anyway, perhaps a grid control is more up to the task.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Is there anyone that know how to save the web page that shown in a web browser control to HTML File?
G Nagendran
|
|
|
|
|
VARIANT vtEmpty;<br />
vtEmpty.vt = VT_EMPTY;<br />
m_WebBrowserCtrl.ExecWB(OLECMDID_SAVEAS,OLECMDEXECOPT_PROMPTUSER,&vtEmpty,&vtEmpty);
|
|
|
|
|
Thank you very much... It's working...
G Nagendran
|
|
|
|
|
This program will put the menu on the screen but
it won't print the results to the screen.
/* Currency equivalence to the Dollar*/
#include <stdio.h>
float Australian_Dollar; //Australian Dollar
float Euro; //Euro Dollar
float British_Pound; //British_Pound Dollar
float Japanese_Yen; //Japanese_Yen Dollar
float Swiss_Franc; //Swiss_Franc Dollar
/* Dollar conversion */
int main(void)
{
/* 13 */
int menunum; /*Defines the menunum as an integer for the scanf */
float count;
while (menunum != 0) {
printf (" Select a currency by entering a the number beside the currency. \n\n");
printf(" Enter q to quit.\n\n");
printf (" 1. Australian Dollar \n");
printf (" 2. Euro \n");
printf (" 3. British Pound \n");
printf (" 4. Japanese Yen \n");
printf (" 5. Swiss Franc \n"); /* 28 */
scanf("%f", &menunum); /* 30 Users enters the number on the menu bar */
if (menunum == 1){
printf("%f\n", Australian_Dollar);
} /* Australian_Dollar */
else if (menunum == 2) {
printf("%f\n", Euro);
}
else if (menunum == 3) {
printf("%f\n", British_Pound);
} /* 41 British_Pound */
else if (menunum == 4) {
printf("%f\n", Japanese_Yen);
} /* Japanese_Yen */
else if (menunum == 5) {
printf("%f\n", Swiss_Franc);
} /* 51 Swiss_Franc */
else {
printf("Choose another or quit.\n");
}
Australian_Dollar = 1.43; // 50 Define Australian dollar
Euro = 0.83; // Define Euro currency
British_Pound = 0.55; // Define British Pound
Japanese_Yen = 110.9; // Define Janpanese Yen
Swiss_Franc = 1.28; // Define Swiss Franc
scanf ( );
return 0;
}
|
|
|
|
|
madref wrote:
scanf("%f", &menunum);
You're mixing float and int here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
HANDLE icmphandle = IcmpCreateFile();
if(icmphandle=INVALID_HANDLE_VALUE )
AfxMessageBox("Error");
char reply[sizeof(icmp_echo_reply)+8];
DWORD dw = IcmpSendEcho(icmphandle,inet_addr(IPAddress),0,0,NULL,reply,sizeof(icmp_echo_reply)+8,1000);
IcmpCloseHandle(icmphandle);
return dw ;
the above mentioned code when executed gives the following error
"The Procedure entry point IcmpcreateFile could not be found in dynamic link library iphlpapi.dll "
|
|
|
|
|
Try including some or all of the following in your file:
#include <winsock2.h>
#include <windows.h>
#include "ipexport.h"
#include "icmpapi.h"
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "iphlpapi.lib")
It may help.
Jerry
|
|
|
|
|
no its wont help still facing the same error
include "stdafx.h"
#include "IPV2.h"
#include "IPV2Doc.h"
#include "IPV2View.h"
#include<winsock2.h>
#include <afxtempl.h>
#include<iphlpapi.h>
#include<icmpapi.h>
#include "ipexport.h"
#include "icmpapi.h"
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "iphlpapi.lib")
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
this is list of all the includes in CPP file
|
|
|
|
|
Perform DUMPBIN /EXPORTS on both
Ws2_32.dll
and
iphlpapi.dll
and see if the function is actually exported from the DLL.
Maybe you typed the name wrong?
|
|
|
|
|
Could somebody tell me where can I find a article or exaple about to create reports using the Crystal Reports with VC 6++.
Thank
Ariel
|
|
|
|
|
|
How come I got the following error when including my dialog1.h file twice in separate files.
The compiler brakes at:
<br />
class CDialog1 : public CDialog<br />
{<br />
public:<br />
CDialog1 (CWnd* pParent = NULL);
<br />
enum { IDD = IDD_DIALOG1 };
…<br />
};<br />
…<br />
This error is followed by the “error C2057: expected constant expression”
Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
d00_ape wrote:
enum { IDD = IDD_ CDIALOG1 }; // BRAKES HERE AND GIVES THE ERROR: error C2065: 'IDD_DIALOG1' :
Assuming this line should read
enum { IDD = IDD_DIALOG1 };
Then you need to ensure that IDD_DIALOG1 exist in the following files:
resource.h
<projectname>.rc
Where <projectname> is the name of your project.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
d00_ape wrote:
IDD_ CDIALOG1
first check above IDD_CDIALOG1 present in the Resource.h,
if yes then just include
#include"resource.h"
above class
if no ,look for the real id of dialog
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
ThatsAlok wrote:
#include"resource.h"
made it for me!!
Thanks
...and justice for all
APe
|
|
|
|
|
how could I measure size of a folder(including sub-folders and files) from code? tried CFileStatus.m_size, but it seems that MFC doesnt look at a folder as a kind of file. All comments are welcomed, especially with sample code
|
|
|
|
|
Recursively add up the size of each file in each folder. This is a trivial problem with plenty of examples available here at CP, as well as Google.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi,
I m using DragAcceptFiles().
now how can i chk which file is draged n droped ,
i want to get file name and path .
some said use DragQueryFile(..)
but return according to MSDN only name of file not full path .
but i m fail to get a name too
thanx
Regards.
|
|
|
|
|
What does your code look like? According to MSDN, the path is included.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
My code is as follows
May be i have mistake in it.
str gives nothing;
void CCloseDlg::OnDropFiles(HDROP hDropInfo)
{
AfxMessageBox ("Darg n drop");
LPTSTR str;
UINT n;
DragQueryFile( hDropInfo, 0xffffffff , str, n);
AfxMessageBox(str);
CDialog::OnDropFiles(hDropInfo);
}
plz make correction
thanx
Regards.
|
|
|
|