Click here to Skip to main content
15,898,134 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionSinking IE printpreview toolbar events Pin
TClarke5-Feb-09 0:46
TClarke5-Feb-09 0:46 
AnswerRe: Sinking IE printpreview toolbar events Pin
Stuart Dootson5-Feb-09 6:29
professionalStuart Dootson5-Feb-09 6:29 
GeneralRe: Sinking IE printpreview toolbar events Pin
TClarke6-Feb-09 0:22
TClarke6-Feb-09 0:22 
QuestionWTL 8.0 tabbrowser sample crash Pin
Babil_JR3-Feb-09 4:40
Babil_JR3-Feb-09 4:40 
AnswerRe: WTL 8.0 tabbrowser sample crash Pin
Jonathan Davies3-Feb-09 5:23
Jonathan Davies3-Feb-09 5:23 
AnswerRe: WTL 8.0 tabbrowser sample crash Pin
Stuart Dootson3-Feb-09 5:36
professionalStuart Dootson3-Feb-09 5:36 
GeneralRe: WTL 8.0 tabbrowser sample crash Pin
Babil_JR4-Feb-09 0:09
Babil_JR4-Feb-09 0:09 
Questionget SafeArray data...... Pin
vijay.victory1-Feb-09 20:06
vijay.victory1-Feb-09 20:06 
Hi Experts,

I m devlopeing a COM application which takes one string and gives list of similar
words.
for that purpose I have used VARIANT* to store and return the list.

My code for the exported function is as :

LngGenSugg( BSTR* pcIpIscii, VARIANT *pacSuggArray, int* piNSugg, LFONT lfIOLayout, int *iResult)
{
// TODO: Add your implementation code here
USES_CONVERSION;
char buffer[20];
HRESULT hr= S_OK;

// Create SafeArray of VARIANT BSTRs
SAFEARRAY *pSA;
SAFEARRAYBOUND aDim[1];
aDim[0].lLbound= 0;
aDim[0].cElements= WordLen +1;
pSA= SafeArrayCreate(VT_BSTR,1,aDim);
if (pSA != NULL)
{
_variant_t vOut;
VariantInit(&vOut);
vOut.vt= VT_BSTR; // set type
long aLong[1];

for (LONG l= aDim[0].lLbound; l< (aDim[0].cElements + aDim[0].lLbound); l++)
{
aLong[0]= l; // set index value
ltoa(l,buffer,10);
vOut.bstrVal = A2W("Victory");
if((hr= SafeArrayPutElement(pSA, aLong, &vOut)) != S_OK)
{
SafeArrayDestroy(pSA); // does a deep destroy
return hr;
}
MessageBox(NULL,(char*)pSA[l].pvData ,"pSA",0);
}

}
V_VT(pacSuggArray)= VT_ARRAY | VT_BSTR;
V_ARRAY(pacSuggArray)= pSA; // (pSA may be null)
.
.
.
.
}

I just try to give words as "Victory";
so Is it correct way to do thiss???
and
Exception occured during execution at MessageBos() cal.

can anyone help me??

and Another problem is..
I have tried the same function by using char** str Array that stores similar words list but..
I m failed to assing it to return VARIANT array pacSuggArray.

so plz help me..

Thanx in advance...
waiting for ur valuable reply...


regards ,

Victory

AnswerRe: get SafeArray data...... Pin
Jonathan Davies1-Feb-09 23:44
Jonathan Davies1-Feb-09 23:44 
GeneralRe: get SafeArray data...... Pin
vijay.victory2-Feb-09 18:32
vijay.victory2-Feb-09 18:32 
GeneralRe: get SafeArray data...... Pin
Jonathan Davies2-Feb-09 23:21
Jonathan Davies2-Feb-09 23:21 
QuestionProblem in Registerign COM Add-In Pin
SNI29-Jan-09 22:12
SNI29-Jan-09 22:12 
AnswerRe: Problem in Registerign COM Add-In Pin
«_Superman_»1-Feb-09 1:02
professional«_Superman_»1-Feb-09 1:02 
QuestionATL Add-In and MFC DLL communication problem? Pin
SNI23-Jan-09 1:50
SNI23-Jan-09 1:50 
AnswerRe: ATL Add-In and MFC DLL communication problem? Pin
Roger Stoltz23-Jan-09 6:07
Roger Stoltz23-Jan-09 6:07 
GeneralRe: ATL Add-In and MFC DLL communication problem? Pin
SNI29-Jan-09 2:12
SNI29-Jan-09 2:12 
GeneralRe: ATL Add-In and MFC DLL communication problem? Pin
Roger Stoltz29-Jan-09 3:14
Roger Stoltz29-Jan-09 3:14 
GeneralRe: ATL Add-In and MFC DLL communication problem? Pin
SNI30-Jan-09 2:16
SNI30-Jan-09 2:16 
GeneralRe: ATL Add-In and MFC DLL communication problem? Pin
SNI20-Feb-09 0:26
SNI20-Feb-09 0:26 
QuestionHow to deal with "Currently ATL objects may only be added to ATL projects, or certain types of MFC projects (EXE, Control, Regular DLL)."? Pin
huangdingjun21-Jan-09 14:51
huangdingjun21-Jan-09 14:51 
AnswerRe: How to deal with "Currently ATL objects may only be added to ATL projects, or certain types of MFC projects (EXE, Control, Regular DLL)."? Pin
Stuart Dootson21-Jan-09 21:26
professionalStuart Dootson21-Jan-09 21:26 
Questionneed help with wtl 8 owner drawn controls Pin
Babil_JR21-Jan-09 5:25
Babil_JR21-Jan-09 5:25 
AnswerRe: need help with wtl 8 owner drawn controls Pin
Stuart Dootson21-Jan-09 6:26
professionalStuart Dootson21-Jan-09 6:26 
Questionexports enum from COM Pin
vijay.victory20-Jan-09 22:13
vijay.victory20-Jan-09 22:13 
AnswerRe: exports enum from COM Pin
Jonathan Davies21-Jan-09 0:05
Jonathan Davies21-Jan-09 0: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.