Search found 124 matches

by whertz
Thu Jun 04, 2015 6:55 pm
Forum: Linux
Topic: Free disk space in Linux
Replies: 2
Views: 2922

Re: Free disk space in Linux

Thanks!!!
by whertz
Thu Jun 04, 2015 5:04 pm
Forum: Linux
Topic: Free disk space in Linux
Replies: 2
Views: 2922

Free disk space in Linux

Does anyone know of a way to determine free disk space in Linux? I need to find out the free disk space of the drive when I specify a path. I'm porting one of my applications to Linux and this is the only hurdle stopping me. I use the Windows API call to get the free disk space on a particular drive ...
by whertz
Mon Jun 06, 2011 12:55 pm
Forum: Coding Questions
Topic: Using IE or FF for remote a PB Server EXE
Replies: 22
Views: 6292

Re: Using IE or FF for remote a PB Server EXE

Thanks for sharing the calc example JackWebb, very nice.

I have a question though for any experts: Would any web hosting companies allow the use of an exe file as cgi? Maybe a Virtual Private Server (VPS)?

I have a good idea for a website using a pb exe for the cgi, but like freepurebasic says ...
by whertz
Tue May 10, 2011 7:30 pm
Forum: Coding Questions
Topic: Problem with window size restriction
Replies: 10
Views: 2006

Re: Problem with window size restriction

Arctic Fox wrote:Why don't you use WindowBounds()?
Thanks! I was updating one of my old programs and maybe this command wasn't in pb at the time. Which version was this introduced?
by whertz
Tue May 10, 2011 5:50 pm
Forum: Coding Questions
Topic: Problem with window size restriction
Replies: 10
Views: 2006

Problem with window size restriction

The following code is taken from an example here on the forums by netmaestro. I just changed the openwindow to open at 400x400, the same as the restriction. The problem is, 400x400 is not the real restricted size, you can still make the window a bit smaller. Changing *mminfo\ptMinTrackSize\y = 400 ...
by whertz
Mon Apr 11, 2011 4:51 pm
Forum: Coding Questions
Topic: Run program before shutdown
Replies: 6
Views: 2113

Re: Run program before shutdown

@whertz
Don't give up on Group Policy if you want to keep this simple. Just add a batch file into the Shutdown folder used by the MMC Group Policy snap-in. You will need admin privileges for MMC setup and to put the .BAT file in the proper folder but once there it can run a PB EXE which will not be ...
by whertz
Mon Apr 11, 2011 11:38 am
Forum: Coding Questions
Topic: Run program before shutdown
Replies: 6
Views: 2113

Re: Run program before shutdown

I just thought someone on the forum might have wanted to do this before and had some code handy.
ricardo posted a code example just 3 weeks ago:
http://www.purebasic.fr/english/viewtopic.php?f=12&t=45779

Thanks Shardik. Seems simple enough, but this code would not wait until your program has ...
by whertz
Sun Apr 10, 2011 9:36 pm
Forum: Coding Questions
Topic: Run program before shutdown
Replies: 6
Views: 2113

Re: Run program before shutdown

You could catch the #WM_QUERYENDSESSION message ( http://msdn.microsoft.com/en-us/library/aa376890%28v=vs.85%29.aspx ), block shutting down, run the program you need and then shut down yourself.

Thanks c4s but that's beyond my capability. I just thought someone on the forum might have wanted to ...
by whertz
Sun Apr 10, 2011 8:38 pm
Forum: Coding Questions
Topic: Run program before shutdown
Replies: 6
Views: 2113

Run program before shutdown

Does anyone know how to run a program before windows shuts down? Like this tool does: http://www.fileware.com/products.htm#LastChance

I don't need to shut down windows myself, what I need is to detect when Windows shuts down, launch a program and when it is finished then carry on shutting windows ...
by whertz
Sat Apr 09, 2011 4:17 pm
Forum: Coding Questions
Topic: Disabling a drive
Replies: 3
Views: 1104

Re: Disabling a drive

@MachineCode: I've come across this a few times, but the game I'm referring to is Age of Empires (the original). There is a registry setting for cd drive, but it is used for copy protection/loading data only. CD audio is always used from the first CD drive it comes across.

@Trond: Yes, I could do ...
by whertz
Sat Apr 09, 2011 2:34 pm
Forum: Coding Questions
Topic: Disabling a drive
Replies: 3
Views: 1104

Disabling a drive

Is it possible in PB to disable/enable a drive, the same was as if you right-click the device in device manager and disable it from there? Specifically I'm looking to disable a CD-ROM drive.

The reason why is I want to make a little launcher program as some old games are badly written and look for ...
by whertz
Tue Mar 01, 2011 9:58 pm
Forum: Coding Questions
Topic: Merging SHA1 values
Replies: 2
Views: 1087

Re: Merging SHA1 values

Okay thanks.
by whertz
Tue Mar 01, 2011 9:09 pm
Forum: Coding Questions
Topic: Merging SHA1 values
Replies: 2
Views: 1087

Merging SHA1 values

Does anyone know how to do this:

Let's say I have the SHA1 hash values of a file that is split into two or more.
I also have the SHA1 value of the file when it is complete.
How can I make the SHA1 values of the split files match the hash I have of the complete file? Without using any SHA1 ...
by whertz
Thu Feb 03, 2011 7:45 pm
Forum: Coding Questions
Topic: Help deleting a file in System32 dir
Replies: 14
Views: 3713

Re: Help deleting a file in System32 dir

Rook Zimbabwe wrote:Save yourself SERIOUS trouble and heartache and just quit messing in the System Folders!!!
Aww, you're no fun. I like messing with files in my System32 folder. :D
by whertz
Thu Feb 03, 2011 1:32 pm
Forum: Coding Questions
Topic: Help deleting a file in System32 dir
Replies: 14
Views: 3713

Re: Help deleting a file in System32 dir

Nice solution GoodNPlenty, but does disabling redirection affect programs outside your program? If so this could be dangerous if something happened and your program crashed before it had time to re-enable redirection.