Click here to Skip to main content
15,889,542 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using User-Defined controls Pin
Christian Graus8-Jan-08 18:35
protectorChristian Graus8-Jan-08 18:35 
GeneralRe: Using User-Defined controls Pin
Member 7816108-Jan-08 18:50
Member 7816108-Jan-08 18:50 
QuestionSQL Database pictures in datagridview Pin
Jacob Dixon8-Jan-08 15:45
Jacob Dixon8-Jan-08 15:45 
GeneralRe: SQL Database pictures in datagridview Pin
cola19738-Jan-08 20:48
cola19738-Jan-08 20:48 
GeneralRe: SQL Database pictures in datagridview Pin
cola19738-Jan-08 20:50
cola19738-Jan-08 20:50 
GeneralTextBox get focus always Pin
jason_mf8-Jan-08 14:46
jason_mf8-Jan-08 14:46 
GeneralRe: TextBox get focus always Pin
Paul Conrad8-Jan-08 17:29
professionalPaul Conrad8-Jan-08 17:29 
QuestionTrace implementation for static methods. Pin
Ilia Blank8-Jan-08 10:55
Ilia Blank8-Jan-08 10:55 
Hi,
My C# code calls to bunch of external methods exported from gdi32.dll
That’s example of the code we use to export the methods from the dll:



[DllImport("gdi32.dll")]<br />
internal static extern int ExtEscape(HDC hDC, <br />
                                    int nEscape, <br />
                                    int inputSize,<br />
                                    ref CWDDECMD InputData, <br />
                                    int outputSize, <br />
                                    ref CIWSINFO OutputData);<br />
<br />
<br />
…<br />
[DllImport("gdi32.dll")]<br />
internal static extern int ExtEscape(HDC hDC, <br />
                                     int nEscape,<br />
                                     int inputSize,<br />
                                     ref CWDDECMD InputData,<br />
                                     int outputSize,<br />
                                     ref CIOVLTHEATERMODE OutputData);





There are over two hundred of method declarations and they are different only by type of parameters (ie CIWSINFO versus CIOVLTHEATERMODE in this examle).

The methods are called from all around the code.
Now I have to come with design that allows tracing calls to the methods
While printing the name of the method and type and values of passed parameters (this part is simple as each passed type implements ToString method).

I just hate idea of duplicating each declaration with the method that performs tracing before calling to real method:


[DllImport("gdi32.dll")]<br />
internal static extern int ExtEscape(…);<br />
<br />
static int ExtEscapeTrace (…)<br />
{<br />
    DoTrace ();<br />
    ExtEscape (…) ; //Perform real call<br />
}



To bad the methods are static; otherwise I would be able to use proxies.

Any ideas?
GeneralWeb Browser Control Pin
A.Asif8-Jan-08 10:41
A.Asif8-Jan-08 10:41 
General[Message Deleted] Pin
Marutar8-Jan-08 10:35
Marutar8-Jan-08 10:35 
GeneralRe: WMI in C#? Pin
ekynox8-Jan-08 18:11
ekynox8-Jan-08 18:11 
GeneralRe: WMI in C#? Pin
Marutar9-Jan-08 3:30
Marutar9-Jan-08 3:30 
GeneralRe: WMI in C#? Pin
ekynox9-Jan-08 9:56
ekynox9-Jan-08 9:56 
GeneralWhy i am getting MessageBox twice Pin
netJP12L8-Jan-08 9:30
netJP12L8-Jan-08 9:30 
GeneralRe: Why i am getting MessageBox twice Pin
Christian Graus8-Jan-08 9:51
protectorChristian Graus8-Jan-08 9:51 
GeneralRe: Why i am getting MessageBox twice Pin
netJP12L8-Jan-08 10:52
netJP12L8-Jan-08 10:52 
GeneralRe: Why i am getting MessageBox twice Pin
Skippums8-Jan-08 11:18
Skippums8-Jan-08 11:18 
GeneralRe: Why i am getting MessageBox twice Pin
netJP12L8-Jan-08 16:19
netJP12L8-Jan-08 16:19 
GeneralRe: Why i am getting MessageBox twice Pin
PIEBALDconsult8-Jan-08 9:52
mvePIEBALDconsult8-Jan-08 9:52 
GeneralRe: Why i am getting MessageBox twice Pin
visualhint11-Jan-08 4:07
visualhint11-Jan-08 4:07 
General[C#.net] Connection on data base sqlserver Pin
abbd8-Jan-08 8:32
abbd8-Jan-08 8:32 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
J4amieC8-Jan-08 8:58
J4amieC8-Jan-08 8:58 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
Colin Angus Mackay8-Jan-08 9:06
Colin Angus Mackay8-Jan-08 9:06 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
Ennis Ray Lynch, Jr.8-Jan-08 9:29
Ennis Ray Lynch, Jr.8-Jan-08 9:29 
Question.axpx+javascript ? Pin
simworld8-Jan-08 8:24
simworld8-Jan-08 8:24 

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.