Wrox Programmer Forums
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 25th, 2005, 08:02 PM
Authorized User
Join Date: Nov 2005
Posts: 15
Thanks: 5
Thanked 0 Times in 0 Posts
Default PInvoke

Hi All
Could Anyone Please tell me how to write PInvoke by using "OutputDebugString"
for the below tracelistener

namespace System.Diagnostics {
using System;
using System.Text;

public abstract class TraceListener : MarshalByRefObject,
IDisposable {

protected TraceListener () {

protected TraceListener(string name) {
this.listenerName = name;

public virtual string Name {
get {

set { listenerName = value; }
public abstract void Write(string message);

public virtual void Write(object o) {
if (o == null) return;

public abstract void WriteLine(string message);

public virtual void WriteLine(object o) {
WriteLine(o == null ? "" : o.ToString());


Similar Threads
Thread Thread Starter Forum Replies Last Post
PInvoke jack_3 Visual C++ 1 November 26th, 2005 03:21 AM
Pinvoke problems gavh C# 2 July 27th, 2004 05:55 PM
Error: Invalid PInvoke metadata format shahchi1 General .NET 1 May 26th, 2004 08:16 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.