C/C++ ʵÏÖÎļþ͸Ã÷¼Ó½âÃÜ
Çë¼û´úÂëÏêϸעÊÍ
// ÐÞ¸´Éæ¼°ºóÊÓÁбíµÄWin2K¼æÈÝÐÔ
// Fixes Win2K compatibility regarding lookaside lists.
//
#ifndef _WIN2K_COMPAT_SLIST_USAGE // Add content(Ôö¼ÓÄÚÈÝ)
#define _WIN2K_COMPAT_SLIST_USAGE
#endif
#include "ntifs.h"
#include "ntdddisk.h"
//
// ÔÚ´úÂëÖпªÆôÕâЩ¾¯¸æ
// Enable these warnings in the code.
//
#pragma warning(error:4100) // Unreferenced formal parameter δ±»ÒýÓõÄÕýʽ²ÎÊý
#pragma warning(error:4101) // Unreferenced local variable δ±»ÒýÓõľֲ¿²ÎÊý
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /
//
// Macro and Structure Definitions
//
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /
//
// VERSION NOTE:
//
// ÏÂÃæµÄºêÔÚWindows XP¼°ÒÔºó£Ï£ÓÖеÄNTIFS.HÖб»¶¨Ò壬Èç¹ûÎÒÃÇÔÚWindows 2000»·¾³Ï±àÒë¼ÓÉÏÕâЩ¶¨Òå
// The following useful macros are defined in NTIFS.H in Windows XP and later.
// We will define them locally if we are building for the Windows 2000
// environment.
//
#if WINVER == 0x0500
//
// ÓÃÓÚ²âÊÔ¡¢ÉèÖá¢Çå³ý±êÖ¾
// These macros are used to test, set and clear flags respectively
//
// ´ò¿ª±êÖ¾
#ifndef FlagOn
#define FlagOn(_F, _SF) ((_F) & (_SF))
#endif
// ²âÊÔ±êÖ¾ÊÇ·ñ´ò¿ª
#ifndef BooleanFlagOn
#define BooleanFlagOn(F, SF) ((BOOLEAN) (((F) & (SF)) != 0))
#endif
// ÉèÖñêÖ¾
#ifndef SetFlag
#define SetFlag(_F, _SF) ((_F) |= (_SF))
#endif
// Çå³ý±êÖ¾
#ifndef ClearFlag
#define ClearFlag(_F, _SF) ((_F) &= ~(_SF))
#endif
#define RtlInitEmptyUnicodeString(_ucStr, _buf, _bufSize) \
((_ucStr)->Buffer = (_buf), \
(_ucStr)->Length = 0, \
(_ucStr)->MaximumLength = (USHORT)(_bufSize))
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) (((a) > (b)) ?
Ïà¹ØÎĵµ£º
VB
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
MSComm1.CommPort = i1
MSComm1.PortOpen = True
MSComm1.InputMode = comInputModeBinary
MSComm1.InBufferCount = 0
& ......
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include ".\sqlite3_lib\sqlite3.h"
static int _callback_exec(void * notused,int argc, char ** argv, char ** aszColName)
{
int i;
for ( i=0; i<argc; i++ )
......
ʹÓà gcc ÔÚ ubuntu Ï ±àÒë Ò»¸ö C³ÌÐò £º
µÚÒ»²½Ö裺´ò¿ª ÖÐ¶Ë £¨Õâ¸ö ÖªµÀ°É£¿£©
ÊäÈë sudo gedit no.c (no.cΪCÎļþÃû×Ö)
sudo ±íʾÄãÊäÈë ......
»ùÓÚS3C2440µÄLinuxÄÚºËÒÆÖ²ºÍyaffs2ÎļþÏµÍ³ÖÆ×÷ ÊÕ²Ø
LinuxÄÚºËÒÆÖ²ºÍ¸ùÎļþÏµÍ³ÖÆ×÷
µÚÒ»ÕÂ ÒÆÖ²ÄÚºË... 2
1.1 LinuxÄں˻ù´¡ÖªÊ¶... 2
1.1.1 Linux°æ±¾... 2
1.1.2 ʲôÊDZê×¼ÄÚºË... 2
1.1.3 Linux²Ù×÷ϵͳµÄ·ÖÀà... 3
1.1.4 linuxÄں˵ÄÑ¡Ôñ... 4
1.2 LinuxÄÚºËÆô¶¯¹ý³Ì¸ÅÊö... 5
1.2.1 ......
¡¡¡¡extern "C" °üº¬Ë«Öغ¬Ò壬´Ó×ÖÃæÉϼ´¿ÉµÃµ½£ºÊ×ÏÈ£¬±»ËüÐÞÊεÄÄ¿±êÊÇ“extern”µÄ£»Æä´Î£¬±»ËüÐÞÊεÄÄ¿±êÊÇ“C”µÄ¡£ÈÃÎÒÃÇÀ´Ïêϸ½â¶ÁÕâÁ½Öغ¬Òå¡£
¡¡¡¡£¨1£© ±»extern "C"ÏÞ¶¨µÄº¯Êý»ò±äÁ¿ÊÇexternÀàÐ͵ģ»
¡¡¡¡externÊÇC/C++ÓïÑÔÖбíÃ÷º¯ÊýºÍÈ«¾Ö±äÁ¿×÷Ó÷¶Î§£¨¿É¼ûÐÔ£©µÄ¹Ø¼ü×Ö£¬¸Ã¹ ......