Click here to Skip to main content
15,914,363 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr23-Sep-05 10:58
ddmcr23-Sep-05 10:58 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
toxcct24-Sep-05 5:40
toxcct24-Sep-05 5:40 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr24-Sep-05 8:58
ddmcr24-Sep-05 8:58 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
Jörgen Sigvardsson25-Sep-05 0:17
Jörgen Sigvardsson25-Sep-05 0:17 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr25-Sep-05 7:27
ddmcr25-Sep-05 7:27 
QuestionRecord sound Pin
bulgaa23-Sep-05 4:19
bulgaa23-Sep-05 4:19 
AnswerRe: Record sound Pin
Alexander M.,24-Sep-05 8:59
Alexander M.,24-Sep-05 8:59 
QuestionCoInitializeEx and failure about document establishes Pin
Tcpip200523-Sep-05 3:47
Tcpip200523-Sep-05 3:47 
I used the code bellow to Initialize COM. but It always says that Establishes the spatial documents is defeated when the program run.
I used app wizard to create a MDI project Test(vc6).
I only changed the base class of CTestView into CMyView. CMyView is my own definition.It was derived from CListView.
Code in InitInstance:
HRESULT hres;
	hres =  CoInitializeEx(0, COINIT_MULTITHREADED); // Initialize COM.
	if (FAILED(hres))
	{
		// Program has failed.
		CString csErr;
		csErr.Format( _T("Failed to initialize COM library. Error code = %d"),hres);
		AfxMessageBox(csErr);
		return FALSE;
	}
	hres =  CoInitializeSecurity(NULL, -1, NULL, NULL,
		RPC_C_AUTHN_LEVEL_CONNECT, 
		RPC_C_IMP_LEVEL_IDENTIFY, 
        NULL, EOAC_NONE, 0
		); 
	if(FAILED(hres))
	{
		AfxMessageBox(_T("CoInitializeSecurity Failed"));
	}


and Code in ExitInstance:
CoUninitialize();


for a test,you must define _WIN32_DCOM

Please,give me a help. Thank you very much.
QuestionBSTR to char[] Pin
Eytukan23-Sep-05 3:40
Eytukan23-Sep-05 3:40 
AnswerRe: BSTR to char[] Pin
Phil J Pearson23-Sep-05 4:06
Phil J Pearson23-Sep-05 4:06 
AnswerRe: BSTR to char[] Pin
prasad_som23-Sep-05 4:14
prasad_som23-Sep-05 4:14 
Answernot done :( Pin
Eytukan23-Sep-05 4:21
Eytukan23-Sep-05 4:21 
AnswerRe: BSTR to char[] Pin
Kharfax23-Sep-05 9:01
Kharfax23-Sep-05 9:01 
Questionoffscreen GUI Pin
JChui23-Sep-05 2:59
JChui23-Sep-05 2:59 
QuestionInsert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:20
vikas amin23-Sep-05 2:20 
AnswerRe: Insert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:21
vikas amin23-Sep-05 2:21 
AnswerRe: Insert at Cursor position in CEdit Pin
Chris Losinger23-Sep-05 2:23
professionalChris Losinger23-Sep-05 2:23 
GeneralRe: Insert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:54
vikas amin23-Sep-05 2:54 
GeneralRe: Insert at Cursor position in CEdit Pin
David Crow23-Sep-05 3:27
David Crow23-Sep-05 3:27 
GeneralRe: Insert at Cursor position in CEdit Pin
Eytukan23-Sep-05 3:50
Eytukan23-Sep-05 3:50 
GeneralRe: Insert at Cursor position in CEdit Pin
Eytukan23-Sep-05 2:54
Eytukan23-Sep-05 2:54 
QuestionNeed a simple way to change Back Color of CEdit & CStatic controls Pin
vikas amin23-Sep-05 2:05
vikas amin23-Sep-05 2:05 
AnswerRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
prasad_som23-Sep-05 2:40
prasad_som23-Sep-05 2:40 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
Laffis23-Sep-05 2:57
Laffis23-Sep-05 2:57 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
vikas amin23-Sep-05 3:11
vikas amin23-Sep-05 3:11 

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.