Click here to Skip to main content
15,909,651 members
Home / Discussions / C#
   

C#

 
AnswerRe: Kill the DLL Pin
Dragonfly_Lee9-Mar-09 19:31
Dragonfly_Lee9-Mar-09 19:31 
Questionproject doubt Pin
vinithakizhussery9-Mar-09 18:31
vinithakizhussery9-Mar-09 18:31 
AnswerRe: project doubt Pin
Christian Graus9-Mar-09 18:42
protectorChristian Graus9-Mar-09 18:42 
AnswerRe: project doubt Pin
yesu prakash9-Mar-09 18:56
yesu prakash9-Mar-09 18:56 
AnswerRe: project doubt Pin
yesu prakash9-Mar-09 19:14
yesu prakash9-Mar-09 19:14 
AnswerRe: project doubt Pin
Dragonfly_Lee9-Mar-09 19:33
Dragonfly_Lee9-Mar-09 19:33 
AnswerRe: project doubt Pin
0x3c09-Mar-09 20:44
0x3c09-Mar-09 20:44 
AnswerRe: project doubt Pin
#realJSOP10-Mar-09 2:33
professional#realJSOP10-Mar-09 2:33 
AnswerRe: project doubt Pin
Nagy Vilmos10-Mar-09 2:50
professionalNagy Vilmos10-Mar-09 2:50 
AnswerRe: project doubt Pin
Zhat10-Mar-09 3:00
Zhat10-Mar-09 3:00 
GeneralRe: project doubt Pin
vinithakizhussery10-Mar-09 4:59
vinithakizhussery10-Mar-09 4:59 
AnswerRe: project doubt Pin
Wes Aday10-Mar-09 4:36
professionalWes Aday10-Mar-09 4:36 
AnswerRe: project doubt Pin
Rutvik Dave10-Mar-09 4:38
professionalRutvik Dave10-Mar-09 4:38 
GeneralRe: project doubt Pin
vinithakizhussery10-Mar-09 5:10
vinithakizhussery10-Mar-09 5:10 
GeneralRe: project doubt Pin
yesu prakash10-Mar-09 20:25
yesu prakash10-Mar-09 20:25 
QuestionReplicate Vista Feature (Is there an API?) Pin
User 23822929-Mar-09 16:32
User 23822929-Mar-09 16:32 
QuestionExcel and C# Pin
clj198705039-Mar-09 15:14
clj198705039-Mar-09 15:14 
AnswerRe: Excel and C# Pin
Christian Graus9-Mar-09 16:19
protectorChristian Graus9-Mar-09 16:19 
GeneralRe: Excel and C# Pin
abhiram_nayan9-Mar-09 21:39
abhiram_nayan9-Mar-09 21:39 
Question"could not find installable ISAM" error when reading Excel.xls file by OleDbConnection Pin
imio249-Mar-09 14:47
imio249-Mar-09 14:47 
AnswerRe: "could not find installable ISAM" error when reading Excel.xls file by OleDbConnection Pin
Mycroft Holmes9-Mar-09 21:24
professionalMycroft Holmes9-Mar-09 21:24 
QuestionTelent connect for Oracle.Net app Pin
BrianWood9-Mar-09 13:38
BrianWood9-Mar-09 13:38 
QuestionExceptions and out parameters Pin
mringholm9-Mar-09 13:00
mringholm9-Mar-09 13:00 
I have a com dll written in VC6 c++ and and app written in c#, my question is the following:

I want to be able to return the parameter values from the com dll even if an exception occurs, this works in vb6 as well as in vc6 c++ but for some reason in c# the parameters are returned empty. The parameters that are passed into the com dll are assigned values prior to the exception being thrown so why aren't the values returned to the calling app?

I know, I know why would I want to do something like this? Well, because I want to differentiate between error and alarm conditions without adding additional parameters to my functions. In case of an error condition (fatal) the exception is thrown prior to the return parameters being populated, in the case of an alarm (non-fatal) condition the return parameters are populated prior to the exception being thrown.

C++ COM function definition:
HRESULT GetInfo([out] BSTR* name, [out] BSTR* serialNumber, [out] BSTR* modelNumber);

C# calling routine:
try
{
GetInfo(out name, out serialNumber, out modelNumber, out mac);
}
catch(ComException ex)
{
Debug.WriteLine(SerialNumber);
}

Is this possible? Seems like it should be as it works correctly with VB6 and C++.
AnswerRe: Exceptions and out parameters Pin
Christian Graus9-Mar-09 14:07
protectorChristian Graus9-Mar-09 14:07 
GeneralRe: Exceptions and out parameters Pin
mringholm10-Mar-09 5:26
mringholm10-Mar-09 5:26 

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.