473,503 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.
--
Doug Taylor
Nov 16 '05 #1
1 2150
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/de...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.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.