Click here to Skip to main content
15,896,063 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionATL wizard not adding Get and Put function prototypes to the class definition. Pin
KASR14-Jul-07 23:16
KASR14-Jul-07 23:16 
AnswerRe: ATL wizard not adding Get and Put function prototypes to the class definition. Pin
Bart10-Jul-07 7:12
Bart10-Jul-07 7:12 
GeneralRe: ATL wizard not adding Get and Put function prototypes to the class definition. Pin
KASR110-Jul-07 18:25
KASR110-Jul-07 18:25 
GeneralRe: ATL wizard not adding Get and Put function prototypes to the class definition. Pin
Bart10-Jul-07 18:37
Bart10-Jul-07 18:37 
GeneralRe: ATL wizard not adding Get and Put function prototypes to the class definition. Pin
KASR110-Jul-07 18:55
KASR110-Jul-07 18:55 
QuestionAdding bitmap images to toolbar buttons programmatically Pin
rindam28-Jun-07 0:29
rindam28-Jun-07 0:29 
AnswerRe: Adding bitmap images to toolbar buttons programmatically Pin
khan++12-Jul-07 2:33
khan++12-Jul-07 2:33 
QuestionHow Can I Pass Struct between ATL and client Pin
kasinli26-Jun-07 20:40
kasinli26-Jun-07 20:40 
I need pass struct from client to ATL(EXE server).The struct is defined as
struct node{
BSTR description; /* optional element of type xsd:string */
BSTR id; /* optional element of type xsd:string */
BSTR name; /* optional element of type xsd:string */
struct {BSTR* tags;int numberOfTags;}
}.
So I add the following codes two IDL file,
typedef struct TAGS_DEF {
BSTR* item; //pointer to the memory where tags are stared.
int length; //number of tags
}TAGS;
typedef struct RESNODE {
BSTR description; /* optional element of type xsd:string */
BSTR id; /* optional element of type xsd:string */
BSTR name; /* optional element of type xsd:string */
TAGS tags;
}ResNode
And I add an interface "[id(6), helpstring("方法AddOrModifyRes")] HRESULT AddOrModifyRes([in] ResNode* res, [in] BSTR operat);"

But the code can't run when the client call the interface.The codes in clients is
hr = spf.CoCreateInstance( CLSID_DataServer);
if( FAILED( hr )) throw( _T("server errror!"));
ResNode rn;
BSTR* tmpStr=NULL;
rn.tags.item=tmpStr;
rn.tags.length=0;
BSTR tmp=L"add";
spf->AddOrModifyRes(rn,tmp);

if the ATL is defined as a DLL. the problem doesn't appear.

the following is the content of my idl file.
// monwebDataService.idl : monwebDataService 的 IDL 源
//

import "oaidl.idl";
import "ocidl.idl";
typedef struct TAGS_DEF {
BSTR* item; //pointer to the memory where tags are stared.
int length; //number of tags
}TAGS;
typedef struct RESNODE {
BSTR description; /* optional element of type xsd:string */
BSTR id; /* optional element of type xsd:string */
BSTR name; /* optional element of type xsd:string */
TAGS tags;
}ResNode;
[
object,
uuid(EEC2233E-D1A7-435A-9CBD-48901778AEB7),
dual,
nonextensible,
helpstring("IDataServer 接口"),
pointer_default(unique)
]
interface IDataServer : IDispatch{
[id(1), helpstring("IsDataOK")] HRESULT IsDataOK([in,out] BYTE* sucFlag);
[id(2), helpstring("AddOrModifyRes")] HRESULT AddOrModifyRes([in] ResNode* res, [in] BSTR operat);
};
[
uuid(B79310B8-7A31-4598-897B-A9DD16EA3C33),
version(1.0),
helpstring("monwebDataService 1.0 tlbSmile | :) ")
]
library monwebDataServiceLib
{
importlib("stdole2.tlb");
[
uuid(8256EA22-CA60-4914-B8EB-F215E01C91A7),
helpstring("DataServer Class")
]
coclass DataServer
{
[default] interface IDataServer;
};
};

kasin li
AnswerRe: How Can I Pass Struct between ATL and client Pin
CPallini5-Jul-07 1:42
mveCPallini5-Jul-07 1:42 
QuestionHow to make drop down part of toolbar button more wider? Pin
Padmanabh Sharma26-Jun-07 18:54
Padmanabh Sharma26-Jun-07 18:54 
AnswerRe: How to make drop down part of toolbar button more wider? Pin
khan++12-Jul-07 2:51
khan++12-Jul-07 2:51 
QuestionDispatch map methods not correctly exported Pin
volker.holzbach25-Jun-07 0:12
volker.holzbach25-Jun-07 0:12 
AnswerRe: Dispatch map methods not correctly exported Pin
prasad_som27-Jun-07 1:03
prasad_som27-Jun-07 1:03 
AnswerRe: Dispatch map methods not correctly exported Pin
User 2155974-Jul-07 20:50
User 2155974-Jul-07 20:50 
GeneralRe: Dispatch map methods not correctly exported Pin
volker.holzbach5-Jul-07 1:18
volker.holzbach5-Jul-07 1:18 
QuestionRe: Dispatch map methods not correctly exported Pin
prasad_som5-Jul-07 21:23
prasad_som5-Jul-07 21:23 
AnswerRe: Dispatch map methods not correctly exported Pin
volker.holzbach18-Jul-07 1:46
volker.holzbach18-Jul-07 1:46 
QuestionWhy can`t use OnPaint? Pin
chenzhengxi@outlook.com21-Jun-07 20:08
chenzhengxi@outlook.com21-Jun-07 20:08 
QuestionRe: Why can`t use OnPaint? Pin
prasad_som27-Jun-07 1:08
prasad_som27-Jun-07 1:08 
Questionloadin unmanaged dll from resources Pin
mustafa13121-Jun-07 4:44
mustafa13121-Jun-07 4:44 
QuestionCram std::map into std:vector Pin
Jnewg520-Jun-07 4:11
Jnewg520-Jun-07 4:11 
AnswerRe: Cram std::map into std:vector Pin
Jnewg520-Jun-07 4:13
Jnewg520-Jun-07 4:13 
GeneralRe: Cram std::map into std:vector Pin
Stephen Hewitt20-Jun-07 14:09
Stephen Hewitt20-Jun-07 14:09 
AnswerRe: Cram std::map into std:vector Pin
Stephen Hewitt20-Jun-07 14:05
Stephen Hewitt20-Jun-07 14:05 
AnswerRe: Cram std::map into std:vector Pin
Michael Dunn23-Jun-07 9:09
sitebuilderMichael Dunn23-Jun-07 9:09 

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.