Win32汇编扩展教程

来源:互联网 发布:淘宝佣金结算时间 编辑:程序博客网 时间:2024/05/29 15:47

Win32汇编扩展教程

第一课 Win32 扩展消息框示例
在罗哥云琳的Win32消息框示例基础上,做一个扩展例子。
首先弹出消息框,2个按钮,YESNO; 点击NO,程序结束;点击YES,弹出第二个消息框。

代码:
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;扩展消息框示例
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat,stdcall
option casemap:none
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include 文件定义
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 数据段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.data szCaption1 db '第一个消息框',0
szText1 db 'Hello, World !',0
szCaption2 db '第二个消息框',0
szText2 db 'Hello, World, World2 !',0 

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 代码段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
start:
invoke MessageBox,NULL,offset szText1,offset szCaption1,MB_YESNO
.if EAX==6
invoke MessageBox,NULL,offset szText2,offset szCaption2,MB_OK
.else
invoke ExitProcess,NULL
.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end start



要点:
MB_OK标志有一个OK按钮,MB_YESNO标志则2个按钮;
MessageBox如果正确,返回点击按钮对应的整型值;YES按钮为6,NO按钮为7;
Masm32的分支语句写法;可参阅罗哥教程;

第二课 ShowWindow参数研究

 ShowWindow函数的显示窗口参数共有13种选择;编制一个程序,点击不同按钮,用不同参数显示窗口,以观察情况;

; ShowWindowDetail.asm

; ShowWindow参数研究

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; 使用 nmake 或下列命令进行编译和链接:

; ml /c /coff ShowWindowDetail.asm

; Link /subsystem:windows ShowWindowDetail.obj

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

.386

.model flat,stdcall

option casemap:none

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; Include 文件定义

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

include \masm32\include\windows.inc

include \masm32\include\gdi32.inc

includelib \masm32\lib\gdi32.lib

include \masm32\include\user32.inc

includelib \masm32\lib\user32.lib

include \masm32\include\kernel32.inc

includelib \masm32\lib\kernel32.lib

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; Equ 等值定义

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

ID_BTN1 equ 1001h

ID_BTN2 equ 1002h

ID_BTN3 equ 1003h

ID_BTN4 equ 1004h

ID_BTN5 equ 1005h

ID_BTN6 equ 1006h

ID_BTN7 equ 1007h

ID_BTN8 equ 1008h

ID_BTN9 equ 1009h

ID_BTN10      equ 1010h

ID_BTN11      equ 1011h

ID_BTN12      equ 1012h

ID_BTN13      equ 1013h

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; 数据段

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

.data?


hInstance dd ?

hWinMain dd ?

hWinMain1 dd ?

hWinMain2 dd ?

hWinMain3 dd ?

hWinMain4 dd ?

hWinMain5 dd ?

hWinMain6 dd ?

hWinMain7 dd ?

hWinMain8 dd ?

hWinMain9 dd ?

hWinMain10 dd ?

hWinMain11 dd ?

hWinMain12 dd ?

hWinMain13 dd ?


.const

szClassName db 'MyClass',0

szCaptionMain db 'ShowWindow 参数研究',0

szText            db 'ShowWindow 参数研究',0

szButton      db 'button',0

szButtonText1 db 'SW_FORCEMINIMIZE',0

szButtonText2 db 'SW_HIDE',0

szButtonText3 db 'SW_MAXIMIZE',0

szButtonText4 db 'SW_MINIMIZE',0

szButtonText5 db 'SW_RESTORE',0

szButtonText6 db 'SW_SHOW',0

szButtonText7 db 'SW_SHOWDEFAULT',0

szButtonText8 db 'SW_SHOWMAXIMIZED',0

szButtonText9 db 'SW_SHOWMINIMIZED',0

szButtonText10 db 'SW_SHOWMINNOACTIVE',0

szButtonText11 db 'SW_SHOWNA',0

szButtonText12 db 'SW_SHOWNOACTIVATE',0

szButtonText13 db 'SW_SHOWNORMAL',0

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; 代码段

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

.code

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; 窗口过程

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

_ProcWinMain proc uses ebx edi esi,hWnd,uMsg,wParam,lParam

local @stPs:PAINTSTRUCT

local @stRect:RECT

local @hDc


mov eax,uMsg

;********************************************************************

.if eax == WM_PAINT

invoke BeginPaint,hWnd,addr @stPs

mov @hDc,eax


invoke GetClientRect,hWnd,addr @stRect

invoke DrawText,@hDc,addr szText,-1,\

addr @stRect,\

DT_SINGLELINE or DT_CENTER or DT_VCENTER


invoke EndPaint,hWnd,addr @stPs

;********************************************************************

; 建立十三个按钮

;********************************************************************

.elseif eax == WM_CREATE

invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText1,\

WS_CHILD or WS_VISIBLE,\

10,10,200,22,\

hWnd,ID_BTN1,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText2,\

WS_CHILD or WS_VISIBLE,\

10,35,200,22,\

hWnd,ID_BTN2,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText3,\

WS_CHILD or WS_VISIBLE,\

10,60,200,22,\

hWnd,ID_BTN3,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText4,\

WS_CHILD or WS_VISIBLE,\

10,85,200,22,\

hWnd,ID_BTN4,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText5,\

WS_CHILD or WS_VISIBLE,\

10,110,200,22,\

hWnd,ID_BTN5,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText6,\

WS_CHILD or WS_VISIBLE,\

10,135,200,22,\

hWnd,ID_BTN6,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText7,\

WS_CHILD or WS_VISIBLE,\

10,160,200,22,\

hWnd,ID_BTN7,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText8,\

WS_CHILD or WS_VISIBLE,\

10,185,200,22,\

hWnd,ID_BTN8,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText9,\

WS_CHILD or WS_VISIBLE,\

10,210,200,22,\

hWnd,ID_BTN9,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText10,\

WS_CHILD or WS_VISIBLE,\

10,235,200,22,\

hWnd,ID_BTN10,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText11,\

WS_CHILD or WS_VISIBLE,\

10,260,200,22,\

hWnd,ID_BTN11,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText12,\

WS_CHILD or WS_VISIBLE,\

10,285,200,22,\

hWnd,ID_BTN12,hInstance,NULL


invoke CreateWindowEx,NULL,\

offset szButton,offset szButtonText13,\

WS_CHILD or WS_VISIBLE,\

10,310,200,22,\

hWnd,ID_BTN13,hInstance,NULL


;********************************************************************


.elseif eax == WM_COMMAND

mov eax,wParam

;********************************************************************

; 点击按钮创建不同窗口

;********************************************************************

.if ax == ID_BTN1

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText1,\

WS_OVERLAPPEDWINDOW,\

130,130,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain1,eax

invoke ShowWindow,hWinMain1,SW_FORCEMINIMIZE

.elseif ax == ID_BTN2

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText2,\

WS_OVERLAPPEDWINDOW,\

160,160,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain2,eax

invoke ShowWindow,hWinMain2,SW_HIDE

.elseif ax == ID_BTN3

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText3,\

WS_OVERLAPPEDWINDOW,\

190,190,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain3,eax

invoke ShowWindow,hWinMain3,SW_MAXIMIZE

.elseif ax == ID_BTN4

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText4,\

WS_OVERLAPPEDWINDOW,\

220,220,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain4,eax

invoke ShowWindow,hWinMain4,SW_MINIMIZE

.elseif ax == ID_BTN5

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText5,\

WS_OVERLAPPEDWINDOW,\

250,250,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain5,eax

invoke ShowWindow,hWinMain5,SW_RESTORE

.elseif ax == ID_BTN6

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText6,\

WS_OVERLAPPEDWINDOW,\

280,280,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain6,eax

invoke ShowWindow,hWinMain6,SW_SHOW

.elseif ax == ID_BTN7

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText7,\

WS_OVERLAPPEDWINDOW,\

310,310,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain7,eax

invoke ShowWindow,hWinMain7,SW_SHOWDEFAULT

.elseif ax == ID_BTN8

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText8,\

WS_OVERLAPPEDWINDOW,\

340,340,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain8,eax

invoke ShowWindow,hWinMain8,SW_SHOWMAXIMIZED

.elseif ax == ID_BTN9

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText9,\

WS_OVERLAPPEDWINDOW,\

370,370,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain9,eax

invoke ShowWindow,hWinMain9,SW_SHOWMINIMIZED

.elseif ax == ID_BTN10

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText10,\

WS_OVERLAPPEDWINDOW,\

400,400,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain10,eax

invoke ShowWindow,hWinMain10,SW_SHOWMINNOACTIVE

.elseif ax == ID_BTN11

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText11,\

WS_OVERLAPPEDWINDOW,\

430,430,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain11,eax

invoke ShowWindow,hWinMain11,SW_SHOWNA

.elseif ax == ID_BTN12

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText12,\

WS_OVERLAPPEDWINDOW,\

460,460,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain12,eax

invoke ShowWindow,hWinMain12,SW_SHOWNOACTIVATE

.elseif ax == ID_BTN13

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szButtonText13,\

WS_OVERLAPPEDWINDOW,\

490,490,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain13,eax

invoke ShowWindow,hWinMain13,SW_SHOWNORMAL

               .endif

;********************************************************************


.elseif eax == WM_CLOSE

invoke DestroyWindow,hWinMain

invoke PostQuitMessage,NULL

;********************************************************************

.else

invoke DefWindowProc,hWnd,uMsg,wParam,lParam

ret

.endif

;********************************************************************

xor eax,eax

ret


_ProcWinMain endp


;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

_WinMain proc

local @stWndClass:WNDCLASSEX

local @stMsg:MSG


invoke GetModuleHandle,NULL

mov hInstance,eax

invoke RtlZeroMemory,addr @stWndClass,sizeof @stWndClass

;********************************************************************

; 注册窗口类

;********************************************************************

invoke LoadCursor,0,IDC_ARROW

mov @stWndClass.hCursor,eax

push hInstance

pop @stWndClass.hInstance

mov @stWndClass.cbSize,sizeof WNDCLASSEX

mov @stWndClass.style,CS_HREDRAW or CS_VREDRAW

mov @stWndClass.lpfnWndProc,offset _ProcWinMain

mov @stWndClass.hbrBackground,COLOR_WINDOW + 1

mov @stWndClass.lpszClassName,offset szClassName

invoke RegisterClassEx,addr @stWndClass

;********************************************************************

; 建立并显示窗口

;********************************************************************

invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szClassName,offset szCaptionMain,\

WS_OVERLAPPEDWINDOW,\

100,100,600,400,\

NULL,NULL,hInstance,NULL

mov hWinMain,eax

invoke ShowWindow,hWinMain,SW_SHOWNORMAL

invoke UpdateWindow,hWinMain

;********************************************************************

; 消息循环

;********************************************************************

.while TRUE

invoke GetMessage,addr @stMsg,NULL,0,0

.break .if eax == 0

invoke TranslateMessage,addr @stMsg

invoke DispatchMessage,addr @stMsg

.endw

ret


_WinMain endp

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

start:

call _WinMain

invoke ExitProcess,NULL

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

end start

第三课 在VC++ 2010 中嵌入汇编代码

用汇编实现从一个数begin到end的累加;    

新建一个C++类库:inline int SumASM(int begin, int end);用汇编语言实现;

    然后新建一个class,用作C++/CLI的wrapper;然后在main中调用。

wrapper.h


    using namespace System;

    namespace CPPWrapper{

    

    public ref class Class1

    

{

    

    // TODO: Add your methods for this class here.

    

public:

static int Sum(int begin,int end);

    

};   

}

wrapper.cpp

#include "wrapper.h"


inline int SumASM(int begin, int end)

    

    {

    

    _asm

    

    {

    

    xor eax, eax       //eax清零

    

    mov ecx, end      //循环计数放入ecx,不解释

    

    }

    

    lable:

    

    _asm

    

    {

    

    cmp ecx,begin    //查看ecx是否到达下限begin

    

    jl exit                //如果小于begin则跳出

    

    add eax,ecx       //开始累加

    

    loop lable           //ecx循环,每次会自减1

    

    }

    

    exit:;

    

    }



int CPPWrapper::Class1::Sum(int begin, int end)

    

    {

    

    return SumASM(begin,end);

    

    }

main.cpp

#include <iostream>

#include "stdio.h"


#include "wrapper.h"


using namespace System;

    using namespace std;

    using namespace CPPWrapper;

    

    int main(int argc, char *argv[])

    {

    

    int a=Class1::Sum(1,100);

 

cout<<"result: "<<a;

getchar();

    return 0;

    

    }

 

第四课  Win32汇编操作数据库

ODBC有四个组成部分:       
  应用程序   (Application,你的程序)     
  ODBC   管理器   (ODBC   manager)     
  ODBC   驱动程序(ODBC   Drivers)     
  数据源   (Data   Sources,数据库)    


  核心是ODBC   管理器。    你可把它想象成你的监工。你告诉它你希望他作什么,然后它把你的要求传达给它的工人(ODBC   驱动程序)并完成工作。如果工人有什么想告诉你的,它会与监工(ODBC   管理器)说,由监工传达给你。工人们很明白他们应作什么,因此他们会为你很好的完成工作。使用恰当的ODBC驱动程序来实现你的目的则是ODBC管理器的事。每个ODBC   驱动程序对于它所对应的数据库均有足够了解。各部件各司其职,极大的简化了工作量。   
    
  你的程序<---->   ODBC管理器<---->   ODBC驱动程序   <---->   数据库   
   

 ODBC管理器由Microsoft提供。看一下你的控制面板。如果你正确地安装了ODBC你会找到ODBC数据源(32位)   项目。   至于ODBC驱动程序,   Microsoft随他们的产品提供了好几种。并且你总可从数据库提供商那里获得新的ODBC   驱动程序。只要简单地安装新的ODBC驱动程序,你的机器就可使用新的它以前不知道的数据库。  

 

由于ODBC驱动程序在某些性能方面存在着差异,因此必须存在一种方法,以使得我们的程序能够知道某个ODBC驱动程序是否支持某一特性。   ODBC定义了被称为Interface   Conformance   Levels的三层服务界面。第三层是核心层。任何ODBC驱动程序都要象在第一层和第二层实现功能一样实现核心层表中的所有特性。从我们的程序的眼光来看,   ODBC   APIs被分割为这样的三层。如果某个函数被标为核心的,就意味着你可放心使用而不必担心它是否为你正使用的ODBC驱动程序支持。如果它是一个第一层或第二层的函数,你就得确认ODBC驱动程序是否支持,然后再使用。你可通过MSDN获得ODBC   APIs的详细资料。  

 

ODBC的名词    
  环境(Environment).   和字面意思一样,是一个全局文本用来存取数据。如果你熟悉DAO的话,你可把它想象为一个workspace。它包含应用于所有ODBC   session的信息,例如一个session的connections句柄。在用ODBC之前你必须从环境中获得这个句柄。     
  连接(Connection).   指定ODBC驱动程序和数据源(数据库)。你可以在同一环境中同时连接不同的数据库     
  语句(Statement).   ODBC使用SQL作为自己的语言。   因而只要简单的认为语句就是你希望ODBC执行的SQL命令就行了。 

 

使用ODBC编程的一般步骤:       
  连接数据源     
  创建并执行一条或多条SQL语句     
  检查结果记录(如果有的话)     
  断开数据源    

 

需要包含odbc32.inc和odbc32.lib文件,还有windows.inc。

 

使用win32汇编和odbc建立一个空的mdb文件
BOOL SQLConfigDataSource(HWND hwndParent, UINT
fRequest,LPCSTR IpszDriver, LPCSTR IpszAttributes);
其中四个参数的用法如下:
1参数hwndPwent是父级窗口句柄。如果句柄
为NULL,将不会显示一些有关的对话框。
如果参数 IpszAttributes提供的信息不够完善,
在创建过程中就会出现对话框要求用户提供相应信
息。
2参数fRequest可以设置为下面的数值之一:
ODBC_ADD_DSN: 增加_个新数据源
ODBC_CONHG_DSN: 配置(修改)一个已经存在的数据源
ODBC_REMOVE_DSN: 删除一个已经存在的数据源
ODBC_ADD_SYS_DSN:. 增加一个新的系统数据源
ODBC_CONFIG—SYS—DSN: 更改一个已经存在的系统数据源
ODBC_REMOVE_SYS_DSN:. 删除一个已经存在的系统数据源
3参数lpszDriver是数据库引擎名称,可以参见
ODBC管理器中对ODBC驱动程序的描述。比如要加
载的是Access数据库,那么数据库引擎名称就为"Microsoft Access Driver (*.mdb)"
4参数lpszAttributes为一连串的"KeyName=value"
字符串,每两个KeyName值之间用""字
符隔开。KeyName主要是新数据源缺省的驱动程序
注册说明,其中最主要的关键字是"DSN"-----    新
数据源的名称,其余关键字则根据不同的数据源有
不同要求。

对文件型数据库来说,根据给出的关键字,建立数据源本身就是建立文件。
Creates a database file. Has the following format: CREATE_DB=<path_name><optional_sort-order><optional_ENCRYPT keyword>, where the path name is the full path to a Microsoft Access database. An error will be returned if the path name specifies an existing database. The sort order will be as set up in the New Database dialog box displayed when the Create button is pressed in the Microsoft Access Setup dialog box. If no sort order is specified, General is used. 
When using the CREATE_DB keyword in the same statement with a DSN keyword, this driver ignores the DSN keyword. Therefore, creating a database and specifying a DSN is a two-step process.When using the CREATE_DB keyword, if the pathname of the Microsoft Access database to be created contains one or more spaces, then the entire pathname must be enclosed by double quotation marks, as shown in the following examples:

"C:\PROGRAM FILES\COMMON FILES\
MyAccess.mdb"

"C:\PROGRAM FILES\Access2.mdb"

CREATE_DB=C:\TEMP\test.mdb (no quotation marks needed)


0 0
原创粉丝点击