By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,892 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,892 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.