Click here to Skip to main content
15,912,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CoCreateInstance Timeout Pin
l a u r e n22-Dec-00 6:22
l a u r e n22-Dec-00 6:22 
GeneralRe: CoCreateInstance Timeout Pin
Julien26-Dec-00 11:24
Julien26-Dec-00 11:24 
GeneralRe: CoCreateInstance Timeout Pin
30-Dec-00 9:38
suss30-Dec-00 9:38 
GeneralCalling VB Com DLLs Pin
21-Dec-00 23:58
suss21-Dec-00 23:58 
GeneralRe: Calling VB Com DLLs Pin
l a u r e n22-Dec-00 6:26
l a u r e n22-Dec-00 6:26 
GeneralRe: Calling VB Com DLLs Pin
Julien26-Dec-00 11:36
Julien26-Dec-00 11:36 
GeneralRe: Calling VB Com DLLs Pin
30-Dec-00 9:33
suss30-Dec-00 9:33 
GeneralRe: Calling VB Com DLLs Pin
31-Dec-00 6:02
suss31-Dec-00 6:02 
VB Code:
Function GetArrayStr(ByRef retArray() As String) As Long
On Error Resume Next
ReDim retArray(32) As String
For i = 1 To UBound(retArray)
retArray(i) = "V" & CStr(i)
Next

GetArrayStr = 1

End Function


// set up our array size
SAFEARRAYBOUND rgsa[] ={32,0};//32 elements
SAFEARRAY* pTempArray = SafeArrayCreate(VT_BSTR, 1, rgsa);//1 dimension

//call our vb function
hr = IVBTestClass->GetArrayStr( &pTempArray, &ReturnValue);


BSTR bstrCurrent = NULL;

// get the number of elements in the array
long lElements=(pTempArray)->rgsabound[0].cElements;


// iterate through our array elements
for (long j = 1; j < lElements; j++)
{
// get our array element
hr = SafeArrayGetElement(pTempArray, &j, &bstrCurrent);
if(FAILED(hr))
break;

char *c = ConvertToAnsi(bstrCurrent);
cout << "The string is: " << c << "." << endl;
}
Questionwindows messages in numeric order? Pin
21-Dec-00 23:42
suss21-Dec-00 23:42 
AnswerRe: windows messages in numeric order? Pin
l a u r e n22-Dec-00 6:16
l a u r e n22-Dec-00 6:16 
AnswerRe: windows messages in numeric order? Pin
Michael Dunn22-Dec-00 16:35
sitebuilderMichael Dunn22-Dec-00 16:35 
GeneralRe: windows messages in numeric order? Pin
l a u r e n23-Dec-00 1:34
l a u r e n23-Dec-00 1:34 
Generalwindows address book file format Pin
l a u r e n21-Dec-00 19:30
l a u r e n21-Dec-00 19:30 
QuestionHow do I write a CBitmap to a file? Pin
21-Dec-00 10:24
suss21-Dec-00 10:24 
AnswerRe: How do I write a CBitmap to a file? Pin
Christian Graus21-Dec-00 10:30
protectorChristian Graus21-Dec-00 10:30 
Generalweb spider script wanted Pin
21-Dec-00 6:34
suss21-Dec-00 6:34 
Questionhow to change BackGroundColor? Pin
20-Dec-00 21:02
suss20-Dec-00 21:02 
AnswerRe: how to change BackGroundColor? Pin
Koceto21-Dec-00 0:58
Koceto21-Dec-00 0:58 
AnswerRe: how to change BackGroundColor? Pin
21-Dec-00 10:38
suss21-Dec-00 10:38 
GeneralRe: how to change BackGroundColor? Pin
21-Dec-00 12:53
suss21-Dec-00 12:53 
GeneralKim Pin
20-Dec-00 16:47
suss20-Dec-00 16:47 
GeneralRe: Kim Pin
Wesley Rogers21-Dec-00 11:03
Wesley Rogers21-Dec-00 11:03 
GeneralDialog Size Pin
20-Dec-00 16:02
suss20-Dec-00 16:02 
GeneralRe: Dialog Size Pin
Christian Graus20-Dec-00 18:53
protectorChristian Graus20-Dec-00 18:53 
Generalreally simple button question Pin
Jared Allen20-Dec-00 15:49
Jared Allen20-Dec-00 15:49 

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.