How in C# to do SetPolygon(SAFEARRAY(double)points)?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I write the C# equivalent of the following VC6 methods? They will be
exposed on a COM interface and used by VC6, VB6, and .NET apps.

int SetPolygon(SAFEARRAY(double)points);
int SetRectangle(SAFEARRAY(double)rects_info);
int SetManyPolygons(SAFEARRAY(SAFEARRAY(double))points);

Each point is an x/y pair.
Each rects_info is an origin x/y, width, and height.
 
Hi

If you have already implement the interface in C++, then you can just add
COM reference to the C++ COM Server.
If you want to do the marshal yourself, you may take a look at the link
below which has some code example.
Default Marshaling for Arrays
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpcondefaultmarshalingforarrays.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top