关于OutputDebugString与天鹰战队P系列函数的使用说明

大家先看下OutputDebugString的函数声明:

/******** 天鹰网络战队 < v2rj.com > ***************************************************

iOutputDebugString : sends a string to the debugger for display.输出调试字符串

lpOutputString [in] Pointer to the null-terminated string to be displayed.

This function does not return a value.

If the application has no debugger, the system debugger displays the string. If the application has no debugger and the system debugger is not active, OutputDebugString does nothing.

***************************************************************************************/

MI void iStdCall OutputDebugStringA(icchar* lpOutputString);

MI void iStdCall OutputDebugStringW(icwchar* lpOutputString);

函数很简单,参数就一个,就是要调试输出的字符串。

为了方便使用,我们天鹰网络战队对这个函数的一些常用操作进行了简化的自己定义:

1、首先对OutputDebugString进行简化,毕竟这个函数名称太长了,每次输入太浪费时间了,所以我们采用了Put这个英文的首字母P来代替OutputDebugString函数

#define P(a)OutputDebugString(a)

2、针对不定参数的使用,即我们天鹰网络战队P1函数用法

类似于sprintf函数的用法,比如可以

P1(“%d , %s”, 16, “dasf” );

3、关于天鹰网络战队的P2用法,用于输出一些常用的结构,比如

iSystemTime tm;

iPt pt;

iRect rct;

iCol col = RGB(5,255,5 );

...

P2( &tm );

P2( &pt );

P2( &rct );

P2( col );

4 、关于天鹰网络战队的P3用法,用于输出一个字符串的前面N个字符

P3( s, 10 ); 则只输出s这个字符串前面10个字符。

关于OutputDebugString与天鹰战队P系列函数的使用说明

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

天鹰网络战队

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值