Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
GeneralRe: Update Stored Procedure throws Exception "Expects Parameter..." Pin
Heath Stewart7-Jun-04 3:42
protectorHeath Stewart7-Jun-04 3:42 
GeneralScrollable control with gradient background Pin
ongo7-Jun-04 3:03
ongo7-Jun-04 3:03 
Generalcode for db acess in C# Pin
Md Saleem Navalur7-Jun-04 2:33
Md Saleem Navalur7-Jun-04 2:33 
GeneralRe: code for db acess in C# Pin
Heath Stewart7-Jun-04 4:05
protectorHeath Stewart7-Jun-04 4:05 
GeneralMalformed Web Response Pin
MrEyes7-Jun-04 2:06
MrEyes7-Jun-04 2:06 
GeneralRe: Malformed Web Response Pin
Heath Stewart7-Jun-04 3:48
protectorHeath Stewart7-Jun-04 3:48 
Generalarray marshalling from c# to COM Pin
rana747-Jun-04 1:04
rana747-Jun-04 1:04 
GeneralRe: array marshalling from c# to COM Pin
Heath Stewart7-Jun-04 5:36
protectorHeath Stewart7-Jun-04 5:36 
The ESP register is a stack pointer that is grabbed by the caller and should reference the address of the variable. In this case it is not.

What is wrong with the SAFEARRAY? Simple array pointers should actually not be used in OLE automation, which describes the requirements for OLE clients - a base minimum set of requirements that all OLE-compliant languages/frameworks should follow (kind of like the CLI, only for COM).

That's not to say it's impossible, though. This isn't uncommon with P/Invoke. Because it's a return value, you also don't need to specify SizeConst, which is only used when marshaling from unmanaged to managed code, which does't happen for a return value.

Try this:
[return: MarshalAs(UnmanagedType.LPArray,
  ArraySubType=UnmanagedType.BStr)]
string[] WeatherOptionsAsArray();


 

Microsoft MVP, Visual C#
My Articles
GeneralRe: array marshalling from c# to COM Pin
rana747-Jun-04 18:41
rana747-Jun-04 18:41 
Questionwhich class can analyse HTTP? Pin
Xytme6-Jun-04 23:50
Xytme6-Jun-04 23:50 
AnswerRe: which class can analyse HTTP? Pin
Heath Stewart7-Jun-04 5:24
protectorHeath Stewart7-Jun-04 5:24 
QuestionWhere does PrintPreview store the doc ? Pin
sachinkalse6-Jun-04 23:37
sachinkalse6-Jun-04 23:37 
AnswerRe: Where does PrintPreview store the doc ? Pin
Heath Stewart7-Jun-04 5:28
protectorHeath Stewart7-Jun-04 5:28 
Questionhow to share dll? Pin
khchan6-Jun-04 23:37
khchan6-Jun-04 23:37 
AnswerRe: how to share dll? Pin
bneacetp6-Jun-04 23:49
bneacetp6-Jun-04 23:49 
GeneralRe: how to share dll? Pin
khchan7-Jun-04 5:10
khchan7-Jun-04 5:10 
GeneralRe: how to share dll? Pin
Heath Stewart7-Jun-04 5:42
protectorHeath Stewart7-Jun-04 5:42 
GeneralRe: how to share dll? Pin
LongRange.Shooter8-Jun-04 4:34
LongRange.Shooter8-Jun-04 4:34 
Generalwhich class can analyse HTTP. Pin
Xytme6-Jun-04 23:09
Xytme6-Jun-04 23:09 
GeneralRe: which class can analyse HTTP. Pin
Heath Stewart7-Jun-04 4:52
protectorHeath Stewart7-Jun-04 4:52 
GeneralRe: which class can analyse HTTP. Pin
Xytme7-Jun-04 15:58
Xytme7-Jun-04 15:58 
GeneralRe: which class can analyse HTTP. Pin
Heath Stewart8-Jun-04 2:43
protectorHeath Stewart8-Jun-04 2:43 
QuestionWich user control is on top? Pin
Klok6-Jun-04 22:59
Klok6-Jun-04 22:59 
AnswerRe: Wich user control is on top? Pin
bneacetp6-Jun-04 23:14
bneacetp6-Jun-04 23:14 
AnswerRe: Wich user control is on top? Pin
Stefan Troschuetz6-Jun-04 23:47
Stefan Troschuetz6-Jun-04 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.