Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to Use structs in COM interfaces when Automation
compatibility is not an issue?



How to Use structs in COM interfaces when Automation compatibility is not an issue?..

Answer / krishna akkulu

Structs, also known as User Defined Types (UDTs), can be
used in Automation- compatible interfaces
An Automation- compatible struct may contain only primitive
Automation types as its members.

Nesting structs is not allowed, but VARIANT is allowed thus
enabling nested structs (you can store a struct in a
VARIANT).

In order for a struct to be usable for Automation-
compatible interfaces, the struct must be described in a
type library and it must be declared with its own GUID:

[uuid(21602F40-CC62-11d4-AA2B-00A0CC39CFE0)]
struct MyStruct
{
[helpstring("A long value")]
long nLongValue;

[helpstring("A string")]
BSTR bstrStringValue;
};

// Later in the IDL file
[uuid(...), version(...), helpstring(...)]
library MyLib
{
...
struct MyStruct;
};
For more info see : http://vcfaq.mvps.org/com/4.htm

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More COM DCOM Interview Questions

Differentiate normal DLL to COM DLL

7 Answers   Talisma,


What happens when client calls CoCreateInstance?

2 Answers   Cap Gemini,


Can I use com components from .net programs?

0 Answers  


where can i use pmcmd commands of informatica

1 Answers  


Suppose we have object B and aggregated object C (in- proc server), created by B. Can you access any interface of B from C?

0 Answers  


What kind of components can be used as DCOM servers?

1 Answers  


What is In-proc?

4 Answers  


What are the different compatibility types when we create a COM component?

1 Answers   TCS,


What is the difference, if any, between OLE and COM?

3 Answers  


Write a JCL to copy only selected members from a partitioned data set to another partitioned data set. (Use: IEBCOPY)

1 Answers   Wipro,


How can would you create an instance of the object in COM

2 Answers  


How do we create dcom object in vb6?

0 Answers  


Categories