WDM プリンタINFファイル解析一般 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
([DestinationDirs])
([DestinationDirs])
639行: 639行:
 
   Dim pDriverDirectory As String
 
   Dim pDriverDirectory As String
 
    
 
    
  'initialization to determine size of buffer required
 
 
   level = 1    'must be 1
 
   level = 1    'must be 1
 
   cbBuff = 0  'must be 0 initially
 
   cbBuff = 0  'must be 0 initially
 
   pDriverDirectory = vbNullString  'must be null string initially
 
   pDriverDirectory = vbNullString  'must be null string initially
 
    
 
    
  'string that specifies the name of the
 
  'server on which the printer driver resides.
 
  'If this parameter is vbNullString the
 
  'local driver-directory path is retrieved.
 
 
   pName = vbNullString
 
   pName = vbNullString
 
    
 
    
  'string that specifies the environment
 
  '(for example, "Windows NT x86", "Windows NT R4000",
 
  '"Windows NT Alpha_AXP", or "Windows 4.0"). If
 
  'this parameter is NULL, the current environment
 
  'of the calling application and client machine
 
  '(not of the destination application and print
 
  'server) is used.
 
 
   pEnvironment = vbNullString
 
   pEnvironment = vbNullString
 
    
 
    
  'find out how large the buffer
 
  'needs to be (pcbNeeded). Call will return 0.
 
 
   If GetPrinterDriverDirectory(pName, _
 
   If GetPrinterDriverDirectory(pName, _
 
                                 pEnvironment, _
 
                                 pEnvironment, _
667行: 653行:
 
                                 cbBuff, _
 
                                 cbBuff, _
 
                                 pcbNeeded) = 0 Then
 
                                 pcbNeeded) = 0 Then
   
+
 
   
+
    'create a buffer large enough for the
+
    'string and a trailing null
+
 
       pDriverDirectory = Space$(pcbNeeded)
 
       pDriverDirectory = Space$(pcbNeeded)
 
       cbBuff = Len(pDriverDirectory)
 
       cbBuff = Len(pDriverDirectory)
 
          
 
          
    'call again. Success = 1
 
 
       If GetPrinterDriverDirectory(pName, _
 
       If GetPrinterDriverDirectory(pName, _
 
                                   pEnvironment, _
 
                                   pEnvironment, _
682行: 664行:
 
                                   pcbNeeded) = 1 Then
 
                                   pcbNeeded) = 1 Then
 
                                          
 
                                          
          'result
+
             Debug.print Left$(pDriverDirectory, pcbNeeded)
             Text1 = Left$(pDriverDirectory, pcbNeeded)
+
 
              
 
              
       End If 'GetPrinterDriverDirectory/2
+
       End If  
   End If 'GetPrinterDriverDirectory/1
+
   End If  
 
+
 
End Sub
 
End Sub
  

2021年4月22日 (木) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス