Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Stdafx Pin
Niklas L27-Jun-10 21:14
Niklas L27-Jun-10 21:14 
QuestionUsage of IHTMLElement Pin
Pk.j27-Jun-10 18:36
Pk.j27-Jun-10 18:36 
AnswerRe: Usage of IHTMLElement Pin
Stephen Hewitt27-Jun-10 19:09
Stephen Hewitt27-Jun-10 19:09 
AnswerRe: Usage of IHTMLElement Pin
ThatsAlok27-Jun-10 19:14
ThatsAlok27-Jun-10 19:14 
AnswerRe: Usage of IHTMLElement Pin
«_Superman_»27-Jun-10 19:23
professional«_Superman_»27-Jun-10 19:23 
GeneralRe: Usage of IHTMLElement Pin
Pk.j27-Jun-10 21:39
Pk.j27-Jun-10 21:39 
GeneralRe: Usage of IHTMLElement Pin
«_Superman_»27-Jun-10 22:16
professional«_Superman_»27-Jun-10 22:16 
GeneralRe: Usage of IHTMLElement Pin
Pk.j27-Jun-10 22:48
Pk.j27-Jun-10 22:48 
Here is my code stuff through which i'm trying to abstract 'id' value

=======================================================================
IHTMLElement *pElement;
HRESULT hr;
TCHAR tChrID[500];
BSTR bStrID;

hr = pElement->get_id(&bStrID);
if (SUCCEEDED(hr))
{
CString StrS;
if (bStrID)
{
WideCharToMultiByte(CP_ACP, 0, bStrID, -1, tChrID, 500, NULL, NULL);
SysFreeString (bStrID);
}

StrS = tChrID;
WriteToLog(StrS); // Creating LOG of 'id'values
pElement ->Release();
}

int WriteToLog(CString strLog)
{
// Open the existing file, or, if the file does not exist,
// create a new file.

SYSTEMTIME systime;
//get universal system time
GetSystemTime(&systime);
CString strTemp;
strTemp.Format (_T("\n%s"), strLog);

HANDLE hFile;
DWORD dwBytesWritten, dwPos;
hFile = CreateFile (TEXT("\\progra~1\\softex\\omnipass\\LOG.TXT"), // Open Two.txt.
GENERIC_WRITE, // Open for writing
0, // Do not share
NULL, // No security
OPEN_ALWAYS, // Open or create
FILE_ATTRIBUTE_NORMAL, // Normal file
NULL); // No template file

if (hFile == INVALID_HANDLE_VALUE)
{
CloseHandle (hFile); // Close the file.
return 1;
}
else
{
// Append the log file at the end
dwPos = SetFilePointer (hFile, 0, NULL, FILE_END);
WriteFile (hFile, strTemp, (strTemp.GetLength() + 1),&dwBytesWritten, NULL);
}

CloseHandle (hFile);

return 0;
}

===========================================================================

But its crashing my application as soon as any website opened in Internet Explorer-8 .
Please let me knaow any mistake you find in my above stuff or eny other way we should impliment this interface .And please guide me

Thankx
GeneralRe: Usage of IHTMLElement Pin
«_Superman_»27-Jun-10 22:51
professional«_Superman_»27-Jun-10 22:51 
GeneralRe: Usage of IHTMLElement Pin
Pk.j27-Jun-10 23:54
Pk.j27-Jun-10 23:54 
GeneralRe: Usage of IHTMLElement Pin
«_Superman_»28-Jun-10 0:07
professional«_Superman_»28-Jun-10 0:07 
GeneralRe: Usage of IHTMLElement Pin
Pk.j28-Jun-10 1:31
Pk.j28-Jun-10 1:31 
GeneralRe: Usage of IHTMLElement Pin
CMalcheski28-Aug-10 10:09
CMalcheski28-Aug-10 10:09 
QuestionSuggestions on Development on Multi Platform Communcation App [modified] Pin
Greg Mort27-Jun-10 11:16
Greg Mort27-Jun-10 11:16 
AnswerRe: Suggestions on Development on Multi Platform Communcation App Pin
Richard MacCutchan27-Jun-10 21:24
mveRichard MacCutchan27-Jun-10 21:24 
GeneralRe: Suggestions on Development on Multi Platform Communcation App Pin
Greg Mort28-Jun-10 2:18
Greg Mort28-Jun-10 2:18 
QuestionPropertySheet Button Pin
john563227-Jun-10 5:54
john563227-Jun-10 5:54 
AnswerRe: PropertySheet Button Pin
ThatsAlok27-Jun-10 19:18
ThatsAlok27-Jun-10 19:18 
QuestionUse Manifest to identifies the privilege level. Pin
aangerma27-Jun-10 2:13
aangerma27-Jun-10 2:13 
AnswerRe: Use Manifest to identifies the privilege level. Pin
KarstenK27-Jun-10 21:29
mveKarstenK27-Jun-10 21:29 
GeneralRe: Use Manifest to identifies the privilege level. Pin
aangerma27-Jun-10 21:54
aangerma27-Jun-10 21:54 
GeneralRe: Use Manifest to identifies the privilege level. Pin
KarstenK27-Jun-10 22:51
mveKarstenK27-Jun-10 22:51 
QuestionIs it harmful to delete IMPLEMENT_DYNCREATE of CPropertyPage? Pin
includeh1026-Jun-10 18:12
includeh1026-Jun-10 18:12 
AnswerRe: Is it harmful to delete IMPLEMENT_DYNCREATE of CPropertyPage? Pin
KarstenK27-Jun-10 21:43
mveKarstenK27-Jun-10 21:43 
AnswerBarcode Application Usage [was: Re: Is it harmful to delete IMPLEMENT_DYNCREATE of CPropertyPage?] Pin
gvMadhav24-Jul-10 17:54
gvMadhav24-Jul-10 17:54 

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.