<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Win 7 x64 DLLs in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Win-7-x64-DLLs-in-SAS/m-p/113041#M259146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Libref SASCBTBL Windows DLLs can be used within SAS. This works very performantly since Windows 95. But some routines from kernel32.dll do no longer work under Windows 7 x64 whereas kernel32.dll still exist. e.g. FindFirstFileA, FindNextFileA, FindClose. =&amp;gt; ERROR:&amp;nbsp; Write Access Violation DATASTEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how these routines can be reactivated unter Win 7 64 bit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you find an Win x32 working example, which gets the first two entries for C:\*.*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions are wellcome.&lt;/P&gt;&lt;P&gt;Heinrich&lt;/P&gt;&lt;P&gt;---------------------&lt;/P&gt;&lt;P&gt;FILENAME SASCBTBL "C:\Temp\DLLAttributeTable.txt"; &lt;/P&gt;&lt;P&gt;* Create Attribute Table with the description of the routines;&amp;nbsp; &lt;BR /&gt; DATA _NULL_;&lt;BR /&gt; FILE SASCBTBL;&lt;BR /&gt; INPUT;&lt;BR /&gt; PUT _INFILE_;&lt;BR /&gt; CARDS4;&lt;BR /&gt; * SASCBTBL Attribute Table for Description of external DLLs used by SAS;&lt;BR /&gt; * DLL used: KERNEL32.DLL;&lt;BR /&gt; * Routines: FindFirstFileA, FindNextFileA, FindClose;&lt;/P&gt;&lt;P&gt;*************************************************&lt;BR /&gt; HANDLE FindFirstFile(&lt;BR /&gt; LPCTSTR lpFileName, // file name&lt;BR /&gt; LPWIN32_FIND_DATA lpFindFileData // data buffer&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;ROUTINE FindFirstFileA&lt;BR /&gt; minarg=11&lt;BR /&gt; maxarg=11&lt;BR /&gt; stackpop=called&lt;BR /&gt; module=Kernel32&lt;BR /&gt; returns=long;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arg 1 char input format=$CSTR260.; * LPCTSTR lpFileName, // address of name of file to search for ;&lt;BR /&gt; * LPWIN32_FIND_DATA lpFindFileData // address of returned information ;&lt;BR /&gt; arg 2 num output fdstart format=pib4.; * DWORD dwFileAttributes ;&lt;BR /&gt; arg 3 num output format=pib8.; * FILETIME ftCreationTime ;&lt;BR /&gt; arg 4 num output format=pib8.; * FILETIME ftLastAccessTime ;&lt;BR /&gt; arg 5 num output format=pib8.; * FILETIME ftLastWriteTime ;&lt;BR /&gt; arg 6 num output format=pib4.; * DWORD nFileSizeHigh ;&lt;BR /&gt; arg 7 num output format=pib4.; * DWORD nFileSizeLow ;&lt;BR /&gt; arg 8 num output format=pib4.; * DWORD dwReserved0 ;&lt;BR /&gt; arg 9 num output format=pib4.; * DWORD dwReserved1 ;&lt;BR /&gt; arg 10 char output format=$CSTR260.; * TCHAR cFileName[ MAX_PATH ] ;&lt;BR /&gt; arg 11 char output format=$CSTR14.; * TCHAR cAlternateFileName[ 14 ] ;&lt;/P&gt;&lt;P&gt;*************************************************&lt;BR /&gt; BOOL FindNextFile(&lt;BR /&gt; HANDLE hFindFile, // search handle&lt;BR /&gt; LPWIN32_FIND_DATA lpFindFileData // data buffer&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;ROUTINE FindNextFileA&lt;BR /&gt; minarg=11&lt;BR /&gt; maxarg=11&lt;BR /&gt; stackpop=called&lt;BR /&gt; module=Kernel32&lt;BR /&gt; returns=long;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arg 1 num input byvalue format=pib4.; * HANDLE hFindFile, // handle of search ;&lt;BR /&gt; * LPWIN32_FIND_DATA lpFindFileData // address of structure for data on found file;&lt;BR /&gt; arg 2 num output fdstart format=pib4.; * DWORD dwFileAttributes ;&lt;BR /&gt; arg 3 num output format=pib8.; * FILETIME ftCreationTime ;&lt;BR /&gt; arg 4 num output format=pib8.; * FILETIME ftLastAccessTime ;&lt;BR /&gt; arg 5 num output format=pib8.; * FILETIME ftLastWriteTime ;&lt;BR /&gt; arg 6 num output format=pib4.; * DWORD nFileSizeHigh ;&lt;BR /&gt; arg 7 num output format=pib4.; * DWORD nFileSizeLow ;&lt;BR /&gt; arg 8 num output format=pib4.; * DWORD dwReserved0 ;&lt;BR /&gt; arg 9 num output format=pib4.; * DWORD dwReserved1 ;&lt;BR /&gt; arg 10 char output format=$CSTR260.; * TCHAR cFileName[ MAX_PATH ] ;&lt;BR /&gt; arg 11 char output format=$CSTR14.; * TCHAR cAlternateFileName[ 14 ] ;&lt;/P&gt;&lt;P&gt;*************************************************&lt;BR /&gt; BOOL FindClose(&lt;BR /&gt; HANDLE hFindFile // file search handle&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;ROUTINE FindClose&lt;BR /&gt; minarg=1&lt;BR /&gt; maxarg=1&lt;BR /&gt; stackpop=called&lt;BR /&gt; module=Kernel32&lt;BR /&gt; returns=long;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arg 1 num input byvalue format=pib4.; * HANDLE hFindFile // file search handle ;&lt;/P&gt;&lt;P&gt;;;;;&lt;BR /&gt; RUN;&lt;/P&gt;&lt;P&gt;***************** Usage in Data Step;&lt;BR /&gt; data dirlist;&lt;BR /&gt; length Path $256 Name $256 DosName $14 Attributes 8;&lt;/P&gt;&lt;P&gt;&amp;nbsp; path="C:\*.*";&lt;/P&gt;&lt;P&gt;&amp;nbsp; handle=modulen ("FindFirstFileA", path,&lt;BR /&gt; Attributes, created, accessed, written, sizeH, sizeL,&lt;BR /&gt; reserve0, reserve1, Name, DosName);&lt;BR /&gt; put _all_;&lt;BR /&gt; handle=modulen ("FindNextFileA", handle,&lt;BR /&gt; Attributes, created, accessed, written, sizeH, sizeL,&lt;BR /&gt; reserve0, reserve1, Name, DosName);&lt;BR /&gt; put _all_;&lt;BR /&gt; handle=modulen ("FindClose", handle);&lt;BR /&gt; put _all_;&lt;BR /&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2012 07:44:41 GMT</pubDate>
    <dc:creator>stuerzl</dc:creator>
    <dc:date>2012-09-06T07:44:41Z</dc:date>
    <item>
      <title>Win 7 x64 DLLs in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Win-7-x64-DLLs-in-SAS/m-p/113041#M259146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Libref SASCBTBL Windows DLLs can be used within SAS. This works very performantly since Windows 95. But some routines from kernel32.dll do no longer work under Windows 7 x64 whereas kernel32.dll still exist. e.g. FindFirstFileA, FindNextFileA, FindClose. =&amp;gt; ERROR:&amp;nbsp; Write Access Violation DATASTEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how these routines can be reactivated unter Win 7 64 bit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you find an Win x32 working example, which gets the first two entries for C:\*.*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions are wellcome.&lt;/P&gt;&lt;P&gt;Heinrich&lt;/P&gt;&lt;P&gt;---------------------&lt;/P&gt;&lt;P&gt;FILENAME SASCBTBL "C:\Temp\DLLAttributeTable.txt"; &lt;/P&gt;&lt;P&gt;* Create Attribute Table with the description of the routines;&amp;nbsp; &lt;BR /&gt; DATA _NULL_;&lt;BR /&gt; FILE SASCBTBL;&lt;BR /&gt; INPUT;&lt;BR /&gt; PUT _INFILE_;&lt;BR /&gt; CARDS4;&lt;BR /&gt; * SASCBTBL Attribute Table for Description of external DLLs used by SAS;&lt;BR /&gt; * DLL used: KERNEL32.DLL;&lt;BR /&gt; * Routines: FindFirstFileA, FindNextFileA, FindClose;&lt;/P&gt;&lt;P&gt;*************************************************&lt;BR /&gt; HANDLE FindFirstFile(&lt;BR /&gt; LPCTSTR lpFileName, // file name&lt;BR /&gt; LPWIN32_FIND_DATA lpFindFileData // data buffer&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;ROUTINE FindFirstFileA&lt;BR /&gt; minarg=11&lt;BR /&gt; maxarg=11&lt;BR /&gt; stackpop=called&lt;BR /&gt; module=Kernel32&lt;BR /&gt; returns=long;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arg 1 char input format=$CSTR260.; * LPCTSTR lpFileName, // address of name of file to search for ;&lt;BR /&gt; * LPWIN32_FIND_DATA lpFindFileData // address of returned information ;&lt;BR /&gt; arg 2 num output fdstart format=pib4.; * DWORD dwFileAttributes ;&lt;BR /&gt; arg 3 num output format=pib8.; * FILETIME ftCreationTime ;&lt;BR /&gt; arg 4 num output format=pib8.; * FILETIME ftLastAccessTime ;&lt;BR /&gt; arg 5 num output format=pib8.; * FILETIME ftLastWriteTime ;&lt;BR /&gt; arg 6 num output format=pib4.; * DWORD nFileSizeHigh ;&lt;BR /&gt; arg 7 num output format=pib4.; * DWORD nFileSizeLow ;&lt;BR /&gt; arg 8 num output format=pib4.; * DWORD dwReserved0 ;&lt;BR /&gt; arg 9 num output format=pib4.; * DWORD dwReserved1 ;&lt;BR /&gt; arg 10 char output format=$CSTR260.; * TCHAR cFileName[ MAX_PATH ] ;&lt;BR /&gt; arg 11 char output format=$CSTR14.; * TCHAR cAlternateFileName[ 14 ] ;&lt;/P&gt;&lt;P&gt;*************************************************&lt;BR /&gt; BOOL FindNextFile(&lt;BR /&gt; HANDLE hFindFile, // search handle&lt;BR /&gt; LPWIN32_FIND_DATA lpFindFileData // data buffer&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;ROUTINE FindNextFileA&lt;BR /&gt; minarg=11&lt;BR /&gt; maxarg=11&lt;BR /&gt; stackpop=called&lt;BR /&gt; module=Kernel32&lt;BR /&gt; returns=long;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arg 1 num input byvalue format=pib4.; * HANDLE hFindFile, // handle of search ;&lt;BR /&gt; * LPWIN32_FIND_DATA lpFindFileData // address of structure for data on found file;&lt;BR /&gt; arg 2 num output fdstart format=pib4.; * DWORD dwFileAttributes ;&lt;BR /&gt; arg 3 num output format=pib8.; * FILETIME ftCreationTime ;&lt;BR /&gt; arg 4 num output format=pib8.; * FILETIME ftLastAccessTime ;&lt;BR /&gt; arg 5 num output format=pib8.; * FILETIME ftLastWriteTime ;&lt;BR /&gt; arg 6 num output format=pib4.; * DWORD nFileSizeHigh ;&lt;BR /&gt; arg 7 num output format=pib4.; * DWORD nFileSizeLow ;&lt;BR /&gt; arg 8 num output format=pib4.; * DWORD dwReserved0 ;&lt;BR /&gt; arg 9 num output format=pib4.; * DWORD dwReserved1 ;&lt;BR /&gt; arg 10 char output format=$CSTR260.; * TCHAR cFileName[ MAX_PATH ] ;&lt;BR /&gt; arg 11 char output format=$CSTR14.; * TCHAR cAlternateFileName[ 14 ] ;&lt;/P&gt;&lt;P&gt;*************************************************&lt;BR /&gt; BOOL FindClose(&lt;BR /&gt; HANDLE hFindFile // file search handle&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;ROUTINE FindClose&lt;BR /&gt; minarg=1&lt;BR /&gt; maxarg=1&lt;BR /&gt; stackpop=called&lt;BR /&gt; module=Kernel32&lt;BR /&gt; returns=long;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arg 1 num input byvalue format=pib4.; * HANDLE hFindFile // file search handle ;&lt;/P&gt;&lt;P&gt;;;;;&lt;BR /&gt; RUN;&lt;/P&gt;&lt;P&gt;***************** Usage in Data Step;&lt;BR /&gt; data dirlist;&lt;BR /&gt; length Path $256 Name $256 DosName $14 Attributes 8;&lt;/P&gt;&lt;P&gt;&amp;nbsp; path="C:\*.*";&lt;/P&gt;&lt;P&gt;&amp;nbsp; handle=modulen ("FindFirstFileA", path,&lt;BR /&gt; Attributes, created, accessed, written, sizeH, sizeL,&lt;BR /&gt; reserve0, reserve1, Name, DosName);&lt;BR /&gt; put _all_;&lt;BR /&gt; handle=modulen ("FindNextFileA", handle,&lt;BR /&gt; Attributes, created, accessed, written, sizeH, sizeL,&lt;BR /&gt; reserve0, reserve1, Name, DosName);&lt;BR /&gt; put _all_;&lt;BR /&gt; handle=modulen ("FindClose", handle);&lt;BR /&gt; put _all_;&lt;BR /&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 07:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Win-7-x64-DLLs-in-SAS/m-p/113041#M259146</guid>
      <dc:creator>stuerzl</dc:creator>
      <dc:date>2012-09-06T07:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Win 7 x64 DLLs in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Win-7-x64-DLLs-in-SAS/m-p/113042#M259147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working solution of the SAS hotline: &lt;/P&gt;&lt;P&gt;For Windows 7 x64 (SAS 9.3) use format &lt;STRONG&gt;pibunaln8&lt;/STRONG&gt;. instead of pib8. and &lt;STRONG&gt;pib8&lt;/STRONG&gt;. instead of pib4. in arg1 of FindNextFile and FindClose in the SASCBTBL definition table. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 13:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Win-7-x64-DLLs-in-SAS/m-p/113042#M259147</guid>
      <dc:creator>stuerzl</dc:creator>
      <dc:date>2012-09-27T13:53:34Z</dc:date>
    </item>
  </channel>
</rss>

