Click here to Skip to main content
15,899,679 members
Home / Discussions / COM
   

COM

 
GeneralIWebBrowser2 Behavior is Different from IE7 in Vista Pin
chunsj11-Dec-07 19:41
chunsj11-Dec-07 19:41 
QuestionNumber Problem...... Pin
Peter Parker11-Dec-07 3:44
Peter Parker11-Dec-07 3:44 
GeneralIntercept Send Mail in Outlook Pin
_AnsHUMAN_ 10-Dec-07 21:13
_AnsHUMAN_ 10-Dec-07 21:13 
GeneralRe: Intercept Send Mail in Outlook Pin
myshketer11-Dec-07 21:11
myshketer11-Dec-07 21:11 
QuestionSmart Tag Creation Pin
anufabian9-Dec-07 22:50
anufabian9-Dec-07 22:50 
GeneralSending string from COM to C# under Vista problem Pin
Stevo Z6-Dec-07 22:53
Stevo Z6-Dec-07 22:53 
QuestionRe: Sending string from COM to C# under Vista problem Pin
Nathan Holt at EMOM7-Dec-07 7:28
Nathan Holt at EMOM7-Dec-07 7:28 
GeneralRe: Sending string from COM to C# under Vista problem Pin
Mike Dimmick7-Dec-07 16:36
Mike Dimmick7-Dec-07 16:36 
If not used in any other projects I would strongly recommend that you stick to Automation-compatible types, so here you would use a BSTR rather than LPSTR. .NET understands Automation types better than raw types.

If you can't do this, you need to ensure that the marshalling and memory model are followed correctly. You need to tell MIDL that the parameter is actually a null-terminated string (use the string attribute in addition to out) so that the data is marshalled correctly. Otherwise it assumes that the LPSTR points to a single char.

For returning a string, you must return a new buffer allocated with the system allocator, CoTaskMemAlloc. I suspect what's happening is that .NET is trying to free the returned pointer by calling CoTaskMemFree and in Windows XP, you were getting away with it.





DoEvents: Generating unexpected recursion since 1991


GeneralRe: Sending string from COM to C# under Vista problem Pin
Stevo Z10-Dec-07 2:20
Stevo Z10-Dec-07 2:20 
GeneralSending array from C# to ActiveX component Pin
Hampus@foi6-Dec-07 20:49
Hampus@foi6-Dec-07 20:49 
AnswerRe: Sending array from C# to ActiveX component Pin
Nathan Holt at EMOM7-Dec-07 7:32
Nathan Holt at EMOM7-Dec-07 7:32 
GeneralRe: Sending array from C# to ActiveX component Pin
Hampus@foi9-Dec-07 22:27
Hampus@foi9-Dec-07 22:27 
GeneralRe: Sending array from C# to ActiveX component Pin
Nathan Holt at EMOM10-Dec-07 7:15
Nathan Holt at EMOM10-Dec-07 7:15 
GeneralRe: Sending array from C# to ActiveX component Pin
User 2155977-Dec-07 11:52
User 2155977-Dec-07 11:52 
GeneralSaving Powerpoint Slide as Bitmap From A Win32 sdk application(NON MFC) Pin
niloy5-Dec-07 18:24
niloy5-Dec-07 18:24 
QuestionCan a COM component be made that will bind to multiple columns in a DB table? Pin
chuckles_net3-Dec-07 11:24
chuckles_net3-Dec-07 11:24 
GeneralClass not registered error Pin
Royce Fickling3-Dec-07 10:31
Royce Fickling3-Dec-07 10:31 
GeneralRe: Class not registered error Pin
User 2155973-Dec-07 10:54
User 2155973-Dec-07 10:54 
QuestionSpecialized OLE container Control Pin
LLINF1-Dec-07 3:41
LLINF1-Dec-07 3:41 
QuestionNULL modem program Pin
AKYap30-Nov-07 17:50
AKYap30-Nov-07 17:50 
QuestionFatal Error Handling Pin
Nathan Holt at EMOM27-Nov-07 6:37
Nathan Holt at EMOM27-Nov-07 6:37 
AnswerRe: Fatal Error Handling Pin
User 21559727-Nov-07 7:44
User 21559727-Nov-07 7:44 
GeneralRe: Fatal Error Handling Pin
Nathan Holt at EMOM27-Nov-07 9:10
Nathan Holt at EMOM27-Nov-07 9:10 
GeneralRe: Fatal Error Handling Pin
User 21559727-Nov-07 9:44
User 21559727-Nov-07 9:44 
QuestionCOM ActiveX Pin
bmbsage27-Nov-07 5:57
bmbsage27-Nov-07 5:57 

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.