
- *
- ' * commdlg.h -- This module defines the 32-Bit Common Dialog APIs *
- Type OPENFILENAME
- lStructSize As Long
- hwndOwner As Long
- hInstance As Long
- lpstrFilter As String
- lpstrCustomFilter As String
- nMaxCustFilter As Long
- nFilterIndex As Long
- lpstrFile As String
- nMaxFile As Long
- lpstrFileTitle As String
- nMaxFileTitle As Long
- lpstrInitialDir As String
- lpstrTitle As String
- flags As Long
- nFileOffset As Integer
- nFileExtension As Integer
- lpstrDefExt As String
- lCustData As Long
- lpfnHook As Long
- lpTemplateName As String
- End Type
- Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
- Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long
- Declare Function GetFileTitle Lib "comdlg32.dll" Alias "GetFileTitleA" (ByVal lpszFile As String, ByVal lpszTitle As String, ByVal cbBuf As Integer) As Integer
在AutoCAD 2012 时,win7 用的是64位的,发现(setq WINDLG (vlax-create-object "MSComDlg.CommonDialog")) 返回为nil
想用 WIN32API ,发现还是不行。
http://bbs.mjtd.com/thread-85724-1-1.html
http://bbs.mjtd.com/forum.php?mo ... mp;extra=#pid737820
(setq name "C:\\DynWrapX.dll")
(setq wsh (vlax-Create-Object "wscript.shell"))
(vlax-invoke wsh 'Run (strcat "RegSvr32.exe " name))
(setq wrap (vlax-create-object "DynamicWrapperX"))
wrap返回的是nil
AutoCAD2012 64位的时候,好像还是不行
|