Click here to Skip to main content
15,898,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CButton & CReBar Pin
Antti Keskinen28-Feb-04 1:39
Antti Keskinen28-Feb-04 1:39 
GeneralRe: CButton & CReBar Pin
Bitzer.bit28-Feb-04 2:20
Bitzer.bit28-Feb-04 2:20 
GeneralRe: CButton & CReBar Pin
Antti Keskinen29-Feb-04 2:18
Antti Keskinen29-Feb-04 2:18 
GeneralDetecting the insertion/removal of removable storage Pin
mmica27-Feb-04 20:35
mmica27-Feb-04 20:35 
GeneralRe: Detecting the insertion/removal of removable storage Pin
Antti Keskinen28-Feb-04 4:06
Antti Keskinen28-Feb-04 4:06 
GeneralRe: Detecting the insertion/removal of removable storage Pin
Michael Dunn28-Feb-04 16:23
sitebuilderMichael Dunn28-Feb-04 16:23 
QuestionHow to pass safearray in a DLL Pin
ritu_kwatra27-Feb-04 20:05
ritu_kwatra27-Feb-04 20:05 
AnswerRe: How to pass safearray in a DLL Pin
SiddharthAtw3-Mar-04 18:09
SiddharthAtw3-Mar-04 18:09 
I know Win32. So I am sending U same. Else gv the id where I can send U complete code. One more thing SafeArray is meant for passnig values from Vb client to vc Dll. Anyway for time being:
// ColorClient.cpp : Defines the entry point for the console application.<br />
//<br />
<br />
#include "stdafx.h"<br />
#include <windows.h><br />
#include <tchar.h><br />
<br />
#import "..\Colors\Colors.tlb"<br />
<br />
using namespace COLORSLib;<br />
<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
	CoInitialize(NULL);<br />
	try<br />
	{<br />
		IColorObjectPtr pSA(__uuidof(ColorObject));<br />
		_variant_t var = pSA->Colors;<br />
		SAFEARRAY* psa = var.parray;<br />
		BSTR* bstrArray;<br />
		SafeArrayAccessData(psa,reinterpret_cast<void**>(&bstrArray));<br />
		for(UINT i =0;i<psa->rgsabound->cElements;i++)<br />
			_tprintf(_T("%ls\n"),bstrArray[i]);<br />
		SafeArrayUnaccessData(psa);<br />
	}<br />
	catch(_com_error e)<br />
	{<br />
		_tprintf(_T("Error: 0x%08  %ls\n"),e.Error(),e.ErrorMessage());<br />
	}<br />
<br />
	CoUninitialize();<br />
	return 0;<br />
}


hope it help.
Cheers!!
Siddharth
GeneralRe: How to pass safearray in a DLL Pin
ritu_kwatra3-Mar-04 18:38
ritu_kwatra3-Mar-04 18:38 
Generalprogram won't rune in NT or XP Pin
catngo27-Feb-04 19:50
catngo27-Feb-04 19:50 
GeneralRe: program won't rune in NT or XP Pin
Gary R. Wheeler28-Feb-04 7:01
Gary R. Wheeler28-Feb-04 7:01 
GeneralRe: program won't rune in NT or XP Pin
Michael Dunn28-Feb-04 16:31
sitebuilderMichael Dunn28-Feb-04 16:31 
Questionhow to create .pdf file. Pin
Xiaodi_Liu27-Feb-04 18:52
Xiaodi_Liu27-Feb-04 18:52 
AnswerRe: how to create .pdf file. Pin
calebcohoon29-Feb-04 18:45
calebcohoon29-Feb-04 18:45 
Questioninterviewee question??? Pin
Balkrishna Talele27-Feb-04 17:25
Balkrishna Talele27-Feb-04 17:25 
AnswerRe: interviewee question??? Pin
Prakash Nadar27-Feb-04 18:34
Prakash Nadar27-Feb-04 18:34 
GeneralRe: interviewee question??? Pin
Balkrishna Talele2-Mar-04 17:34
Balkrishna Talele2-Mar-04 17:34 
GeneralRe: interviewee question??? Pin
Prakash Nadar2-Mar-04 18:14
Prakash Nadar2-Mar-04 18:14 
AnswerRe: interviewee question??? Pin
Gary R. Wheeler28-Feb-04 7:28
Gary R. Wheeler28-Feb-04 7:28 
GeneralRe: interviewee question??? Pin
Balkrishna Talele2-Mar-04 17:32
Balkrishna Talele2-Mar-04 17:32 
GeneralRe: interviewee question??? Pin
Gary R. Wheeler3-Mar-04 12:56
Gary R. Wheeler3-Mar-04 12:56 
GeneralRe: interviewee question??? Pin
Balkrishna Talele3-Mar-04 16:33
Balkrishna Talele3-Mar-04 16:33 
GeneralRe: interviewee question??? Pin
Gary R. Wheeler4-Mar-04 12:07
Gary R. Wheeler4-Mar-04 12:07 
General&quot;Fid dialog box&quot; but application independent Pin
Jahangi Jamshed27-Feb-04 17:10
sussJahangi Jamshed27-Feb-04 17:10 
GeneralRe: &quot;Fid dialog box&quot; but application independent Pin
Balkrishna Talele2-Mar-04 17:40
Balkrishna Talele2-Mar-04 17:40 

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.