Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How to get Windows system directory?
I would appreciate any help about this problem (problem for me :))



Report this thread to moderator Post Follow-up to this message
Old Post
Siniša
09-02-04 08:55 PM


Re: How to get Windows system directory?
MODULE('win32')
GetWindowsDirectory(*CSTRING lpBuffer, ULONG
 SIZE),ULONG,RAW,PASCAL,NAME('GetWindowsD
irectoryA')
END

And in your code you do

LOC:WinDir CSTRING(256)

GetWindowsDir(LOC:WinDir, 255)

et voila
Ivo

"Siniša" <pc_uslugeNOSPAM@mail.inet.hr> schreef in bericht
news:ch750g$pk6$1@sunce.iskon.hr...
> I would appreciate any help about this problem (problem for me :))
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ivo Ivanov
09-02-04 08:55 PM


Re: How to get Windows system directory?
PS
The module must be included in the global MAP.

Ivo

"Ivo Ivanov" <iivanov@modest.nl> schreef in bericht
news:413733ff$0$20576$6c56d894@diablo.nl.easynet.net...
> MODULE('win32')
> GetWindowsDirectory(*CSTRING lpBuffer, ULONG
>  SIZE),ULONG,RAW,PASCAL,NAME('GetWindowsD
irectoryA')
> END
>
> And in your code you do
>
> LOC:WinDir CSTRING(256)
>
> GetWindowsDir(LOC:WinDir, 255)
>
> et voila
> Ivo
>
> "Siniša" <pc_uslugeNOSPAM@mail.inet.hr> schreef in bericht
> news:ch750g$pk6$1@sunce.iskon.hr... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ivo Ivanov
09-02-04 08:55 PM


Re: How to get Windows system directory?
Very simple, but very effective. Thank you... Until next
problem, Siniša



Report this thread to moderator Post Follow-up to this message
Old Post
Siniša
09-02-04 08:55 PM


Re: How to get Windows system directory?
OK, here we go again around system directory. Second question about this is
how to (on some event) create tps files into previously determineted system
directory. For example, I want to create some tps files when first time
start some procedure and to store that files into windows system directory?
I know that must be so simply, but for beginner like me it is not
Regard, Siniša.



Report this thread to moderator Post Follow-up to this message
Old Post
Siniša
09-02-04 08:55 PM


Re: How to get Windows system directory?
1. I guess, just as good practice, you should put each question in its own
thread.
2. You can very easily check the WIN API calls at www.msdn.com or even look
in the source files of Clarion, e.g. CWUTIL.INC
Here the stupid thing is that the guys at SV did not make the effort to put
all API calls into INC file, just selection which they thought we need and
nothing else.
The system directory's API call is the same as with the windows, only the
name is GetSystemDirectory. According to Microsoft and MSDN applications
should not create files into the system directory, only in windows.
3. You can specify in the dictionary that a name of a file is not a litteral
constant but it is kept in a variable by prefixing the litteral with
exclamation mark "!". Thus before opening the file you put the name in the
variable and ta da, the name is dynamic ;o)

success,
Ivo

"Siniša" <pc_uslugeNOSPAM@mail.inet.hr> schreef in bericht
news:ch7ndk$6mn$1@sunce.iskon.hr...
> OK, here we go again around system directory. Second question about this
is
> how to (on some event) create tps files into previously determineted
system
> directory. For example, I want to create some tps files when first time
> start some procedure and to store that files into windows system
directory?
> I know that must be so simply, but for beginner like me it is not
> Regard, Siniša.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ivo Ivanov
09-03-04 01:55 PM


Re: How to get Windows system directory?
> 3. You can specify in the dictionary that a name of a file is not a
litteral
> constant but it is kept in a variable by prefixing the litteral with
> exclamation mark "!". Thus before opening the file you put the name in the
> variable and ta da, the name is dynamic ;o)
>
> success,
> Ivo
OK, this part is partialy succesfull, but... What I've got is tps file with
name WINDOWS.TPS stored in root directory. My effort is to create and store
tps file named PARAMETER.TPS into c:\windows\ directory on first startup of
application.
Regards, Siniša.



Report this thread to moderator Post Follow-up to this message
Old Post
Siniša
09-03-04 01:55 PM


Re: How to get Windows system directory?
Can u post a snippet?

Ivo

"Siniša" <pc_uslugeNOSPAM@mail.inet.hr> schreef in bericht
news:ch9mjf$hp2$1@sunce.iskon.hr... 
> litteral 
the 
> OK, this part is partialy succesfull, but... What I've got is tps file
with
> name WINDOWS.TPS stored in root directory. My effort is to create and
store
> tps file named PARAMETER.TPS into c:\windows\ directory on first startup
of
> application.
> Regards, Siniša.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ivo Ivanov
09-03-04 08:55 PM


Re: How to get Windows system directory?
> 3. You can specify in the dictionary that a name of a file is not a
litteral
> constant but it is kept in a variable by prefixing the litteral with
> exclamation mark "!". Thus before opening the file you put the name in the
> variable and ta da, the name is dynamic ;o)
>
> success,
> Ivo
OK, this part is partialy succesfull, but... What I've got is tps file with
name WINDOWS.TPS stored in root directory. My effort is to create and store
tps file named PARAMETER.TPS into c:\windows\ directory on first startup of
application.
Regards, Siniša.



Report this thread to moderator Post Follow-up to this message
Old Post
Siniša
09-09-04 01:55 AM


Re: How to get Windows system directory?
1. I guess, just as good practice, you should put each question in its own
thread.
2. You can very easily check the WIN API calls at www.msdn.com or even look
in the source files of Clarion, e.g. CWUTIL.INC
Here the stupid thing is that the guys at SV did not make the effort to put
all API calls into INC file, just selection which they thought we need and
nothing else.
The system directory's API call is the same as with the windows, only the
name is GetSystemDirectory. According to Microsoft and MSDN applications
should not create files into the system directory, only in windows.
3. You can specify in the dictionary that a name of a file is not a litteral
constant but it is kept in a variable by prefixing the litteral with
exclamation mark "!". Thus before opening the file you put the name in the
variable and ta da, the name is dynamic ;o)

success,
Ivo

"Siniša" <pc_uslugeNOSPAM@mail.inet.hr> schreef in bericht
news:ch7ndk$6mn$1@sunce.iskon.hr...
> OK, here we go again around system directory. Second question about this
is
> how to (on some event) create tps files into previously determineted
system
> directory. For example, I want to create some tps files when first time
> start some procedure and to store that files into windows system
directory?
> I know that must be so simply, but for beginner like me it is not
> Regard, Siniša.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ivo Ivanov
09-09-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Clarion archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:59 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.