CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: putting files

  1. #1
    Join Date
    Mar 2000
    Posts
    16

    putting files

    Hi,
    I was developing an application which uses a .dat file to store some data. This file is to be opened from c:\windows directory. But if i were to use the same app in winnt does it need to create a different directory named windows. If it does, is there a way by which i can write the file in c:\winnt directory just like how the installation does for storing the files as - winpath etc ..
    Help ..

    pramod_mb
    [email protected]


  2. #2
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: putting files

    If you want to find the windows directory do the following

    private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (byval lpBuffer as string, byval nSize as Long) as Long

    private Sub Form_Load()
    Dim Winlocation as string, Bfr as Long
    Bfr = 255
    Winlocation = Space(255)
    Call GetWindowsDirectory(Winlocation, Bfr)

    End Sub


    Hope This Helps


  3. #3
    Join Date
    Mar 2000
    Posts
    16

    Re: putting files

    thnx for the help. It was just what i wanted.

    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured