Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

How to pass an array of structure as [in, out] paramenter in COM interface definition -


i'm having problems in passing array of structures in definition of com interface. example, i'm trying define series of variables ids in 1 read function , i'm expecting reply function (the same function) bring array of values corresponds defined variable ids:

[helpstring("method readvariables")] hresult readvariables([in] variant varids, [out] _valstruct* retvals);

for _valstruct, definition is:

struct _valstruct {    int varid;    double varval;    int timestamp;    double funcid; ....  } 

i'm not familiar com , know basic types, such int, double, etc... sincerely experts here give me detailed example code or related information. appreciated... thanks!!!

man, it's been ages since did that! anyway, according code have dug 2002, used safearray .. maybe vb interoperability, so:

[id(9), helpstring("method keys")] hresult keys([out, retval] safearray(comint128)* pkeys); 

you can use api functions such safearrayallocdescriptor , safearrayallocdata create array , safearrayaccessdata/safearrayunaccessdata manage contents.

hope helps.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -