Click here to Skip to main content
15,898,222 members
Home / Discussions / COM
   

COM

 
QuestionCOleDispatchException when creating comments for Excel Worksheets Pin
Crash27-Sep-06 10:00
Crash27-Sep-06 10:00 
AnswerRe: COleDispatchException when creating comments for Excel Worksheets Pin
Steve S7-Sep-06 21:51
Steve S7-Sep-06 21:51 
GeneralRe: COleDispatchException when creating comments for Excel Worksheets Pin
Crash28-Sep-06 1:34
Crash28-Sep-06 1:34 
GeneralRe: COleDispatchException when creating comments for Excel Worksheets Pin
Crash28-Sep-06 4:27
Crash28-Sep-06 4:27 
Questionthe problem of SafeArray Pin
XPointer7-Sep-06 7:16
XPointer7-Sep-06 7:16 
AnswerRe: the problem of SafeArray Pin
Hans Ruck8-Sep-06 2:46
Hans Ruck8-Sep-06 2:46 
AnswerRe: the problem of SafeArray Pin
Lim Bio Liong8-Sep-06 3:46
Lim Bio Liong8-Sep-06 3:46 
AnswerRe: the problem of SafeArray Pin
BadJerry8-Sep-06 5:23
BadJerry8-Sep-06 5:23 
Hope this helps.. this creates a variant made of a safe array of variant which themselves are strings!
Just ignore the last 3 lines of code!

void CVariantTools::ToVariant(VARIANT & var,const CStringArray & arrColumns)
{

// Create the array
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = arrColumns.GetSize();
SAFEARRAY FAR* pArrayCol = SafeArrayCreate(VT_VARIANT, 1, rgsabound);

// Fill it with the column property
for ( int nCol=0; nCol < arrColumns.GetSize(); nCol++)
{
long rgIndice=nCol;
COleVariant oleValue(arrColumns.GetAt(nCol),VT_BSTR);
SafeArrayPutElement(pArrayCol,&rgIndice,&oleValue);
}

// Prepare the variants
VariantClear(&var);
var.vt=VT_ARRAY|VT_VARIANT;
var.parray = pArrayCol;

}

GeneralRe: the problem of SafeArray Pin
XPointer10-Sep-06 2:24
XPointer10-Sep-06 2:24 
QuestionUsing COM with ASP.Net Pin
hsv0037-Sep-06 5:46
hsv0037-Sep-06 5:46 
QuestionDLL does not contain any types that can be registered for COM Interop Pin
Calgary Randy6-Sep-06 10:13
Calgary Randy6-Sep-06 10:13 
AnswerRe: DLL does not contain any types that can be registered for COM Interop Pin
Mike Dimmick7-Sep-06 3:59
Mike Dimmick7-Sep-06 3:59 
QuestionRe: DLL does not contain any types that can be registered for COM Interop Pin
Calgary Randy11-Sep-06 20:24
Calgary Randy11-Sep-06 20:24 
AnswerRe: DLL does not contain any types that can be registered for COM Interop Pin
Calgary Randy11-Sep-06 20:29
Calgary Randy11-Sep-06 20:29 
QuestionUsing C#/Office .NET Programmability Pin
Andrew Mercer5-Sep-06 22:44
Andrew Mercer5-Sep-06 22:44 
AnswerRe: Using C#/Office .NET Programmability Pin
Pavan K Kulkarni8-Sep-06 3:51
Pavan K Kulkarni8-Sep-06 3:51 
QuestionIs it possible to convert Visual C++ program with GUI into COM DLL or ActiveX ? Pin
peysock5-Sep-06 6:34
peysock5-Sep-06 6:34 
QuestionIdentifying Dynamic Controls click Pin
vijayaBTS5-Sep-06 0:52
vijayaBTS5-Sep-06 0:52 
GeneralRe: Identifying Dynamic Controls click Pin
voorugonda prashanth6-Sep-06 0:51
voorugonda prashanth6-Sep-06 0:51 
QuestionDLL Conversion to 2005 to 2003 Pin
Charith Jayasundara4-Sep-06 7:13
Charith Jayasundara4-Sep-06 7:13 
QuestionError while accssing methods of interfaces passed in safearray Pin
satindar_kumar4-Sep-06 0:56
satindar_kumar4-Sep-06 0:56 
AnswerRe: Error while accssing methods of interfaces passed in safearray Pin
Lim Bio Liong10-Sep-06 5:37
Lim Bio Liong10-Sep-06 5:37 
QuestionWix Editor Pin
kulile3-Sep-06 23:39
kulile3-Sep-06 23:39 
AnswerRe: Wix Editor Pin
Mike Dimmick6-Sep-06 1:06
Mike Dimmick6-Sep-06 1:06 
QuestionOpening MS Excel document in "read only" mode Pin
Roaming Clone3-Sep-06 20:05
Roaming Clone3-Sep-06 20:05 

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.