gamedevlists-windows Mailing List for gamedev (Page 19)
Brought to you by:
vexxed72
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(58) |
Nov
(49) |
Dec
(38) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(124) |
Feb
(83) |
Mar
(17) |
Apr
(37) |
May
(12) |
Jun
(20) |
Jul
(47) |
Aug
(74) |
Sep
(62) |
Oct
(72) |
Nov
(54) |
Dec
(13) |
2003 |
Jan
(36) |
Feb
(8) |
Mar
(38) |
Apr
(3) |
May
(6) |
Jun
(133) |
Jul
(20) |
Aug
(18) |
Sep
(12) |
Oct
(4) |
Nov
(28) |
Dec
(36) |
2004 |
Jan
(22) |
Feb
(51) |
Mar
(28) |
Apr
(9) |
May
(20) |
Jun
(9) |
Jul
(37) |
Aug
(20) |
Sep
(23) |
Oct
(15) |
Nov
(23) |
Dec
(27) |
2005 |
Jan
(22) |
Feb
(20) |
Mar
(5) |
Apr
(14) |
May
(10) |
Jun
|
Jul
(6) |
Aug
(6) |
Sep
|
Oct
(12) |
Nov
(1) |
Dec
|
2006 |
Jan
(18) |
Feb
(4) |
Mar
(3) |
Apr
(6) |
May
(4) |
Jun
(3) |
Jul
(16) |
Aug
(40) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
(2) |
2007 |
Jan
(5) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(13) |
Jun
|
Jul
(26) |
Aug
(3) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(5) |
2008 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: yogiwp <yo...@gm...> - 2004-05-11 12:30:53
|
[VC6, WinXP] Usually this works: enable "Enable profiling" and "Generate mapfile" checkbox in project settings, and launch profile from the IDE. But it is not working anymore; after the app exits, it gives me this error: "PREP : fatal error PRF1011: cannot open file d:\_projects\inspirit\bin\inspiritclient\inspiritclient.pbo" (Verified that the .pbo file does not exist in that directory or anywhere else on my harddrive). Any clue? Google doesn't give any useful info on this :( Yogi Wahyu Prasidha www.inspiritarena.com |
From: Jon W. <hp...@mi...> - 2004-05-04 23:01:56
|
I wrote up the problems with these timers at http://www.mindcontrol.org/~hplus/pc-timers.html a long time ago, it might be of some service. We use QueryPerformanceCounter()/QueryPerformanceFrequency() to get the initial two measurements, putting a Sleep(50) in the middle, and looping back if QPC says we slept for more than 200 milliseconds. There's a watch-dog, so after 5 tries, it gives up, and accepts whatever numbers we got as true. Also, the QPC call itself isn't allowed to take more than some number of RDTSC cycles (I think we settled on 100,000) to avoid pre-emption or interrupts during the timing from throwing us off. As I've said before on this list, we use rdtsc during intra-frame measurements, but once a second or so, we re-calibrate the timers by calling timeGetTime() and QueryPerformanceCounter() to vote about who slipped the least, and update the baseline. We also use these measurements to update the estimate for CPU frequency. We use the highest CPU frequency ever detected, because of SpeedStep; this means that during CPU idle, time using RDTSC will advance more slowly, and then skip to catch up when we next re-calibrate the clock. For us, this is better than sometimes returning time values that are ahead, because the CPU slowed down and we don't know it yet. No, there are no good real-time timers on current laptops. The next generation of chip sets will support the "advanced timer" feature, which will hopefully make this better -- but that was the idea with the PCI timers (QPC), too, and bugs in implementation made them much less useful than they should have been. Thus, the code looks something like: void read_counters( __int64 * otsc, __int64 * opc ) { __int64 rdtsc_a, rdtsc_b; __int64 pca; int cnt = 0; again: rdtsc_a = rdtsc(); QueryPerformanceCounter( &pca ); rdtsc_b = rdtsc(); if( rdtsc_b - rdtsc_a > READING_THRESHOLD && cnt++ < 5 ) goto again; *otsc = (rdtsc_a + rdtsc_b)/2; *opc = pca; } __int64 calibrate_rdtsc() { __int64 pca, pcb, pcf, tsca, tscb; double interval; QueryPerformanceFrequency( &pcf ); for( int ix = 0; ix < 5; ++ix ) { read_counters( &tsca, &pca ); Sleep( 50 ); read_counters( &tscb, &pcb ); interval = double(pcb-pca)/double(pcf); if( interval < 0.2 ) { break; } } return (tscb-tsca) / interval; } -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Charles Bloom Sent: Monday, May 03, 2004 9:48 PM To: gda...@li... Subject: [Algorithms] calibrating the TSC On the PC you have do this horrible thing to calibrate the TSC where you do a timeGetTime then stall a while and take the time again and look at the difference in clocks & real-time. You have to do this for a second or more to get an accurate measure. Is there a better standard way to do this now? Is there any kind of tsc rate counter you can get that's reliable, like by doing cpuid and look at the mhz or something? ---------------------------------------------------------------------------- ---------------- Charles Bloom email "cb" http://www.cbloom.com ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 |
From: tweety <mi...@sy...> - 2004-04-30 21:29:11
|
I'm trying to post some data (strings, nothing fancy) on a html page through http. the page has a form with a name (yeah, i know, but i'm kinda new at this...) and some input fields. the page will only accept form post data (it gives an error otherwise) and i'm really banging my head on walls here... i checked google and found SOME answers, mostly for java or .net. but i'm interested in plain old c/c++. the best i got to it was to connect through a socket and send the headers manually, but it still didn't work (said they weren't through a FORM tag or something). i don't know how to encode the name of the form tag in the actual message, maybe that's the problem... i dunno... do any of you have any suggestions? maybe even a snippet/sample code? i know it's ot, but... maybe it's not THAT ot, you know? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 |
From: Mike W. <mi...@ge...> - 2004-04-12 08:25:36
|
The only other thing i can suggest (from our own experience with strange crashes like this) is to use a LOT of logging output that does the same basic thing that try loops do, except output human-readable output to the log (and soon in-engine console) when errors occur. We do alot of things like this: theGraphicsEngine = new CGraphicsEngine(bFullScreen, nWidth, nHeight, szTitle, hInstance, chTheDriver, bSoftware, UseDialog, szStartLevel); if(theGraphicsEngine == NULL) { theGraphicsEngine ->ReportError("Can't create Graphics engine!\n", true); return -1; } It's not rocket science, but used liberally throughout the engine it provides us with at least an idea of WHERE exactly the issue is occuring. I've been going on a 'debuglog' wave of late adding as much of this kind of logging output to the various sub-classes as appropriate. By setting a 'DEBUGLEVEL' define (either at runtime or compile), you could set it up to disable or enable the output logging, and can also set the debug to go to the console (ie in-game) if desired. (by default i leave it on - personally i like seeing the various sub-systems fire up as the engine loads) Our developers as a whole don't use any memory/crash dumps, stricly logging errors. It's not the perfect solution, but debugging full-screen apps just isn't really fun, and the logging technique has been working for the 5 years we've been putting out releases. Unfortunately none of our programmers speak native binary or hex and the protocol droid is in the shop... Good luck, lookin forward to seeing the Suffering in stores soon ;} Cheers Mike W www.realityfactory.ca Jon Watte wrote: > I'm copying this to gd-windows, which is where the question should be asked. > (gam...@li...) > > We wrap our game loop in __try / __except and do a crash dump in the except > handler: > > > static BOOL (WINAPI * MyMiniDumpWriteDump)( > HANDLE, DWORD, HANDLE, MINIDUMP_TYPE, PMINIDUMP_EXCEPTION_INFORMATION, > PMINIDUMP_USER_STREAM_INFORMATION, PMINIDUMP_CALLBACK_INFORMATION ); > static HMODULE hDbgHelp = (HMODULE)INVALID_HANDLE_VALUE; > > void InitExceptionSupportAtProgramStart() > { > hDbgHelp = LoadLibrary( "DbgHelp.dll" ); > if( hDbgHelp != (HMODULE)INVALID_HANDLE_VALUE ) { > *(FARPROC *)&MyMiniDumpWriteDump = GetProcAddress( hDbgHelp, > "MiniDumpWriteDump" ); > } > } > > DWORD ExceptionHandler() > { > if( MyMiniDumpWriteDump ) { > HANDLE hFile = CreateFile( ... ); > ... GetExceptionInformation() ... > (*MyMiniDumpWriteDump)( ... ); > CloseHandle( hFile ); > } > else { > // walk the stack from esp up to stack base, looking > // for things that returns like return addresses into > // our executables and DLLS, using the ImageHelp library > // and address/code sniffing; dump into a text-mode file > } > return EXCEPTION_EXECUTE_HANDLER; > } > > > __try { > while( 1 ) { > GameLoop(); > } > } > __except( ExceptionHandler() ) { > UserMessage( "The computer hates you." ); > ExitProcess( -1 ); > } > > > > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...]On Behalf Of Tom > Vykruta > Sent: Thursday, April 08, 2004 4:48 PM > To: gda...@li... > Subject: [Algorithms] Crash helper > > > I apologize for a slightly off topic question, but it's advanced and > hopefully someone has ideas. I'm currently in the midst of running a PC > game (The Suffering) through QA. Unfortunately when it crashes, there is > nothing helpful besides "Crashed to desktop". I want a crash report > generated. I can ship the PDB along with the game, or not. The ideal > thing would be to dump the stack, registers, and perhaps even > disassembly at the crash site. Are there any existing ways to do this? > > I'm compiling under .NET 7.1 + D3D9, pretty standard setup. Thanks all. > > Tomas Vykruta > Project Lead, The Suffering PC > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > |
From: Jon W. <hp...@mi...> - 2004-04-09 00:15:12
|
I'm copying this to gd-windows, which is where the question should be asked. (gam...@li...) We wrap our game loop in __try / __except and do a crash dump in the except handler: static BOOL (WINAPI * MyMiniDumpWriteDump)( HANDLE, DWORD, HANDLE, MINIDUMP_TYPE, PMINIDUMP_EXCEPTION_INFORMATION, PMINIDUMP_USER_STREAM_INFORMATION, PMINIDUMP_CALLBACK_INFORMATION ); static HMODULE hDbgHelp = (HMODULE)INVALID_HANDLE_VALUE; void InitExceptionSupportAtProgramStart() { hDbgHelp = LoadLibrary( "DbgHelp.dll" ); if( hDbgHelp != (HMODULE)INVALID_HANDLE_VALUE ) { *(FARPROC *)&MyMiniDumpWriteDump = GetProcAddress( hDbgHelp, "MiniDumpWriteDump" ); } } DWORD ExceptionHandler() { if( MyMiniDumpWriteDump ) { HANDLE hFile = CreateFile( ... ); ... GetExceptionInformation() ... (*MyMiniDumpWriteDump)( ... ); CloseHandle( hFile ); } else { // walk the stack from esp up to stack base, looking // for things that returns like return addresses into // our executables and DLLS, using the ImageHelp library // and address/code sniffing; dump into a text-mode file } return EXCEPTION_EXECUTE_HANDLER; } __try { while( 1 ) { GameLoop(); } } __except( ExceptionHandler() ) { UserMessage( "The computer hates you." ); ExitProcess( -1 ); } -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Tom Vykruta Sent: Thursday, April 08, 2004 4:48 PM To: gda...@li... Subject: [Algorithms] Crash helper I apologize for a slightly off topic question, but it's advanced and hopefully someone has ideas. I'm currently in the midst of running a PC game (The Suffering) through QA. Unfortunately when it crashes, there is nothing helpful besides "Crashed to desktop". I want a crash report generated. I can ship the PDB along with the game, or not. The ideal thing would be to dump the stack, registers, and perhaps even disassembly at the crash site. Are there any existing ways to do this? I'm compiling under .NET 7.1 + D3D9, pretty standard setup. Thanks all. Tomas Vykruta Project Lead, The Suffering PC ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 |
From: Diogo de A. <Dio...@ne...> - 2004-04-07 23:42:43
|
Yes, that's what I wanted... I can't have a custom solution, since my software needs to integrate with existing software... and badly done at that, too... :| One of the things I'm considering is to use a database and an app that runs nslookup for the cases necessary (filling the database) and using that database to avoid complexity on the server side of things... but it's sloppy coding... The other alternative is to do an implementation of a DNS client (shouldn't be too hard, really... I heard the protocol is pretty simple and it works in a straightforward manner) Diogo de Andrade dio...@sp... -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Jon Watte Sent: quarta-feira, 7 de Abril de 2004 17:53 To: gam...@li... Subject: RE: [GD-Windows] DNS server temporary change It sounds like the original requester has a specific DNS set-up on the local machine that prevents the plain functions from working, but at times he wants to actually get a real DNS resolution from the outside world. nslookup allows you to specify a specific, non-local host for looking up names, hence it would work even if local DNS is differently configured. I'm not going to speculate about what this could be useful for, except to say that we use DNS as a well-tested, high-performance distributed name space database in our server cluster. We wrote our own DNS client code, which isn't that hard -- and it supports asynchronous operation ;-) Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Chris Raine Sent: Wednesday, April 07, 2004 6:20 AM To: gam...@li... Subject: Re: [GD-Windows] DNS server temporary change I would use getaddrinfo() to fill a addrinfo structure or use gethostname() to fill a hostent structure. If the name you specified exists both structures will contain the IP-Address in network byte-order which can be converted to an ascii string by the use of the inet_ntoa() function. All these functions are well documented in the Platform SDK -> Windows Sockets. Of course, you have to link against the WinSock Library and IIRC you have to initialize the library as well. hoping to have helped, chris On Tue, 2004-04-06 at 12:10, Diogo de Andrade wrote: > Hey all! > > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? > > Thanks in advance > > Diogo de Andrade > dio...@sp... > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Jon W. <hp...@mi...> - 2004-04-07 16:53:01
|
It sounds like the original requester has a specific DNS set-up on the local machine that prevents the plain functions from working, but at times he wants to actually get a real DNS resolution from the outside world. nslookup allows you to specify a specific, non-local host for looking up names, hence it would work even if local DNS is differently configured. I'm not going to speculate about what this could be useful for, except to say that we use DNS as a well-tested, high-performance distributed name space database in our server cluster. We wrote our own DNS client code, which isn't that hard -- and it supports asynchronous operation ;-) Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Chris Raine Sent: Wednesday, April 07, 2004 6:20 AM To: gam...@li... Subject: Re: [GD-Windows] DNS server temporary change I would use getaddrinfo() to fill a addrinfo structure or use gethostname() to fill a hostent structure. If the name you specified exists both structures will contain the IP-Address in network byte-order which can be converted to an ascii string by the use of the inet_ntoa() function. All these functions are well documented in the Platform SDK -> Windows Sockets. Of course, you have to link against the WinSock Library and IIRC you have to initialize the library as well. hoping to have helped, chris On Tue, 2004-04-06 at 12:10, Diogo de Andrade wrote: > Hey all! > > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? > > Thanks in advance > > Diogo de Andrade > dio...@sp... > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |
From: Chris R. <c....@gm...> - 2004-04-07 13:19:25
|
I would use getaddrinfo() to fill a addrinfo structure or use gethostname() to fill a hostent structure. If the name you specified exists both structures will contain the IP-Address in network byte-order which can be converted to an ascii string by the use of the inet_ntoa() function.=20 All these functions are well documented in the Platform SDK -> Windows Sockets.=20 Of course, you have to link against the WinSock Library and IIRC you have to initialize the library as well.=20 hoping to have helped,=20 chris=20 On Tue, 2004-04-06 at 12:10, Diogo de Andrade wrote: > Hey all! >=20 > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? >=20 > Thanks in advance >=20 > Diogo de Andrade > dio...@sp... >=20 >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 |
From: Diogo de A. <Dio...@ne...> - 2004-04-06 12:05:05
|
I agree with that attitude (and have done so in the past)... Getting the job done is the most important thing... how you get there is (more often than not) not important... I was just wondering, since nslookup comes with Windows, if the source code is available, or if it just uses something in the platform SDK that might come in handy in this case... if I can't find it, I will use it (although it sucks having to code some way to get stuff out of standard output - redirect the stream from my code, maybe?) Thanks! Diogo de Andrade dio...@sp... -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Dr Andrew Perella Sent: ter=E7a-feira, 6 de Abril de 2004 12:36 To: gam...@li... Subject: RE: [GD-Windows] DNS server temporary change I don't know how easy it is to do this from c++ - however one of the best things I have learned over the last few years is that not everything needs to be "elegant". If nslookup works - I sugest you just use it. It may feel dirty, but you will get more work done with this attitude! I have wasted a lot of time in the past trying to make things "perfect", when often a simple solution will do just as well. It is important to remark that the code must still be easily maintainable however. Regards, Andrew > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Diogo de Andrade > Sent: 06 April 2004 11:11 > To: gam...@li... > Subject: [GD-Windows] DNS server temporary change > > > Hey all! > > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? > > Thanks in advance > > Diogo de Andrade > dio...@sp... > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > _____________________________________________________________________ > This e-mail is confidential and may be privileged. It may be > read, copied and used only by the intended recipient. No > communication sent by e-mail to or from Eutechnyx is intended to > give rise to contractual or other legal liability, apart from > liability which cannot be excluded under English law. > > This message has been checked for all known viruses by Star > Internet delivered through the MessageLabs Virus Control Centre. > > www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322 _____________________________________________________________________ This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. No communication sent by e-mail to or from Eutechnyx is intended to give rise to contractual or other legal liability, apart from liability which cannot be excluded under English law.=20 This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre.=20 www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 |
From: Dr A. P. <aj...@eu...> - 2004-04-06 11:36:16
|
I don't know how easy it is to do this from c++ - however one of the best things I have learned over the last few years is that not everything needs to be "elegant". If nslookup works - I sugest you just use it. It may feel dirty, but you will get more work done with this attitude! I have wasted a lot of time in the past trying to make things "perfect", when often a simple solution will do just as well. It is important to remark that the code must still be easily maintainable however. Regards, Andrew > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Diogo de Andrade > Sent: 06 April 2004 11:11 > To: gam...@li... > Subject: [GD-Windows] DNS server temporary change > > > Hey all! > > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? > > Thanks in advance > > Diogo de Andrade > dio...@sp... > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > _____________________________________________________________________ > This e-mail is confidential and may be privileged. It may be > read, copied and used only by the intended recipient. No > communication sent by e-mail to or from Eutechnyx is intended to > give rise to contractual or other legal liability, apart from > liability which cannot be excluded under English law. > > This message has been checked for all known viruses by Star > Internet delivered through the MessageLabs Virus Control Centre. > > www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322 _____________________________________________________________________ This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. No communication sent by e-mail to or from Eutechnyx is intended to give rise to contractual or other legal liability, apart from liability which cannot be excluded under English law. This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322 |
From: Diogo de A. <Dio...@ne...> - 2004-04-06 10:10:40
|
Hey all! I have an application running on a computer with some DNS settings... The problem is, sometimes I need to resolve an name to an IP address, and I can only do that through another DNS server... My question is, is it possible to do so in C++? Or will I have to use the command line "nslookup" and parse the result? Or the only way is to implement a complete DNS client? Thanks in advance Diogo de Andrade dio...@sp... |
From: Mark W. <mw...@cs...> - 2004-03-27 18:43:37
|
Have you checked out FreeType, at http://www.freetype.org/ ? It is a open source TrueType rasterizer, and it has been used in several=20 commercial games (Warcraft 3 comes to mind) so I don't think there are=20 legal issues. The advantage of doing this is that you can generate optimized bitmaps on=20 the fly, depending on your screen resolution, rather than only doing so for= =20 a limited set of precomputed resolutions and scaling them up. -- Mark At 02:17 AM 3/25/2004, Mike Wuetherick wrote: >sounds like a rather over-zealous legal department ;} > >gawd help you if you run an apache webserver for your website, or...a DNS= =20 >server maybe ;P > >lol anyways, it's there if it's useful, sounds like you have something=20 >that does the same thing anyways. > >on a semi-related there is a program called X-Fonter that lets you browse= =20 >fonts without installing them, not sure how they do that...might be=20 >something useful anyways, it's the only program that i've found that lets= =20 >you do that. > >cheers >mike w >www.gekidodesigns.com > >Jacob Turner (Core Design Ltd) wrote: > >>Hi >>Thanks for the suggestions. AddFontResource(), RemoveFontResource() >>is working fine for us. >>We do already have a tool to preprocess TTF fonts into a TGA for use >>in game rendering of fonts on all platforms. We just wanted to make >>it work by being given the TTF as an input file rather than having to >>install the font on every machine that needs to the preprocess step. >>The preprocess step is part of our automated tool chain so in theory >>can be run on any machine in the building. >>Thanks Mike I will check out the open source engine stuff. But >>recentally our legal people came and talked to us and after that >>discussion it seems it is easier for us to write it all ourselves. >>If we use any external code/tools then we have to ask the legal >>people about before hand, which means it usually quicker to write the >>code/tools ourselves, arrggghghghgh. >>Thanks >>Jake >> >>>-----Original Message----- From: >>>gam...@li...=20 >>>[mailto:gam...@li...]On Behalf >>>Of Mike Wuetherick Sent: 24 March 2004 23:16 To: >>>gam...@li... Subject: Re: >>>[GD-Windows] Windows true type fonts >>> >>>i think i misunderstood - you are looking to do the conversion on >>>the fly? this tool is for just converting them to images, but you >>> should/might be able to use some of the ideas to do the same on >>>the fly? >>>mike w www.gekidodesigns.com >>>Mike Wuetherick wrote: >>> >>>>we already have a tool that will convert a truetype image >>>into a bitmap >>> >>>>with coordinate data image that can be read by the game to >>>break the >>> >>>>single image into individual letters. >>>>the game engine is open-source, so you can grab what you >>>need/want from >>> >>>>it ;} >>>>www.realityfactory.ca >>>>cheers mike w www.gekidodesigns.com >>>> >>>>Jacob Turner (Core Design Ltd) wrote: >>>> >>>>>Writing a tool to output true type fonts as images for use >>>in game. >>> >>>>>All is fine the last thing I would like to do is give the >>>true type >>> >>>>>font file as an input to the tool rather than having to >>>install the >>> >>>>>true type font into the system "fonts" directory. So is there >>>>>a windows way of opening a true type font and then using it >>>via GDI or >>> >>>>>GDIplus drawing commands ? >>>>>Thanks >>>>>Jake >>>>> >>>>>------------------------------------------------------- This >>>>>SF.Net email is sponsored by: IBM Linux Tutorials Free Linux >>>>>tutorial presented by Daniel Robbins, President >>>and CEO of >>> >>>>>GenToo technologies. Learn everything from fundamentals to >>>>>system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=CCk= =20 >>>>>_______________________________________________ Gamedevlists-windows=20 >>>>>mailing list Gam...@li...=20 >>>>>https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >>>>> Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 >>>> >>>>------------------------------------------------------- This >>>>SF.Net email is sponsored by: IBM Linux Tutorials Free Linux >>>>tutorial presented by Daniel Robbins, President >>>and CEO of >>> >>>>GenToo technologies. Learn everything from fundamentals to system >>>> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=CCk=20 >>>> _______________________________________________ Gamedevlists-windows=20 >>>> mailing list Gam...@li...=20 >>>> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >>>> Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 >>> >>>------------------------------------------------------- This SF.Net >>>email is sponsored by: IBM Linux Tutorials Free Linux tutorial >>>presented by Daniel Robbins, President and CEO of GenToo >>>technologies. Learn everything from fundamentals to system=20 >>>administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=3Dick=20 >>>_______________________________________________ Gamedevlists-windows=20 >>>mailing list Gam...@li...=20 >>>https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows=20 >>>Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 >> >>------------------------------------------------------- This SF.Net >>email is sponsored by: IBM Linux Tutorials Free Linux tutorial >>presented by Daniel Robbins, President and CEO of GenToo >>technologies. Learn everything from fundamentals to system=20 >>administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=CCk=20 >>_______________________________________________ Gamedevlists-windows >>mailing list Gam...@li...=20 >>https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows=20 >>Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id70&alloc_id638&opick >_______________________________________________ >Gamedevlists-windows mailing list >Gam...@li... >https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_idU5 -- <Mark Wang> | "There are 10 types of people in <mailto:mw...@cs...> | this world: those who understand <http://www.markwang.com/> | binary and those who don't." <AIM:markwang99 YIM:mwang_1999>| -- Anonymous |
From: Mike W. <mi...@ge...> - 2004-03-25 10:14:13
|
sounds like a rather over-zealous legal department ;} gawd help you if you run an apache webserver for your website, or...a=20 DNS server maybe ;P lol anyways, it's there if it's useful, sounds like you have something=20 that does the same thing anyways. on a semi-related there is a program called X-Fonter that lets you=20 browse fonts without installing them, not sure how they do that...might=20 be something useful anyways, it's the only program that i've found that=20 lets you do that. cheers mike w www.gekidodesigns.com Jacob Turner (Core Design Ltd) wrote: > Hi >=20 > Thanks for the suggestions. AddFontResource(), RemoveFontResource() > is working fine for us. >=20 > We do already have a tool to preprocess TTF fonts into a TGA for use > in game rendering of fonts on all platforms. We just wanted to make > it work by being given the TTF as an input file rather than having to > install the font on every machine that needs to the preprocess step. > The preprocess step is part of our automated tool chain so in theory > can be run on any machine in the building. >=20 > Thanks Mike I will check out the open source engine stuff. But > recentally our legal people came and talked to us and after that > discussion it seems it is easier for us to write it all ourselves. > If we use any external code/tools then we have to ask the legal > people about before hand, which means it usually quicker to write the > code/tools ourselves, arrggghghghgh. >=20 > Thanks >=20 > Jake >=20 >=20 >> -----Original Message----- From: >> gam...@li...=20 >> [mailto:gam...@li...]On Behalf >> Of Mike Wuetherick Sent: 24 March 2004 23:16 To: >> gam...@li... Subject: Re: >> [GD-Windows] Windows true type fonts >>=20 >>=20 >> i think i misunderstood - you are looking to do the conversion on >> the fly? this tool is for just converting them to images, but you >> should/might be able to use some of the ideas to do the same on >> the fly? >>=20 >> mike w www.gekidodesigns.com >>=20 >> Mike Wuetherick wrote: >>=20 >>=20 >>> we already have a tool that will convert a truetype image >>=20 >> into a bitmap >>=20 >>> with coordinate data image that can be read by the game to >>=20 >> break the >>=20 >>> single image into individual letters. >>>=20 >>> the game engine is open-source, so you can grab what you >>=20 >> need/want from >>=20 >>> it ;} >>>=20 >>> www.realityfactory.ca >>>=20 >>> cheers mike w www.gekidodesigns.com >>>=20 >>>=20 >>> Jacob Turner (Core Design Ltd) wrote: >>>=20 >>>=20 >>>> Writing a tool to output true type fonts as images for use >>=20 >> in game. >>=20 >>>> All is fine the last thing I would like to do is give the >>=20 >> true type >>=20 >>>> font file as an input to the tool rather than having to >>=20 >> install the >>=20 >>>> true type font into the system "fonts" directory. So is there >>>> a windows way of opening a true type font and then using it >>=20 >> via GDI or >>=20 >>>> GDIplus drawing commands ? >>>>=20 >>>> Thanks >>>>=20 >>>> Jake >>>>=20 >>>>=20 >>>> ------------------------------------------------------- This >>>> SF.Net email is sponsored by: IBM Linux Tutorials Free Linux >>>> tutorial presented by Daniel Robbins, President >>=20 >> and CEO of >>=20 >>>> GenToo technologies. Learn everything from fundamentals to >>>> system=20 >>>> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk=20 >>>> _______________________________________________=20 >>>> Gamedevlists-windows mailing list=20 >>>> Gam...@li...=20 >>>> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >>>> Archives:=20 >>>> http://sourceforge.net/mailarchive/forum.php?forum_idU5 >>>>=20 >>>>=20 >>>=20 >>>=20 >>> ------------------------------------------------------- This >>> SF.Net email is sponsored by: IBM Linux Tutorials Free Linux >>> tutorial presented by Daniel Robbins, President >>=20 >> and CEO of >>=20 >>> GenToo technologies. Learn everything from fundamentals to system >>> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk=20 >>> _______________________________________________=20 >>> Gamedevlists-windows mailing list=20 >>> Gam...@li...=20 >>> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >>> Archives:=20 >>> http://sourceforge.net/mailarchive/forum.php?forum_idU5 >>>=20 >>>=20 >>=20 >>=20 >> ------------------------------------------------------- This SF.Net >> email is sponsored by: IBM Linux Tutorials Free Linux tutorial >> presented by Daniel Robbins, President and CEO of GenToo >> technologies. Learn everything from fundamentals to system=20 >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick=20 >> _______________________________________________=20 >> Gamedevlists-windows mailing list=20 >> Gam...@li...=20 >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows=20 >> Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 >>=20 >=20 >=20 >=20 > ------------------------------------------------------- This SF.Net > email is sponsored by: IBM Linux Tutorials Free Linux tutorial > presented by Daniel Robbins, President and CEO of GenToo > technologies. Learn everything from fundamentals to system=20 > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk=20 > _______________________________________________ Gamedevlists-windows > mailing list Gam...@li...=20 > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows=20 > Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 >=20 |
From: Jacob T. \(C. D. Ltd\) <Ja...@Co...> - 2004-03-25 09:52:58
|
Hi Thanks for the suggestions. AddFontResource(), RemoveFontResource() is = working fine for us. We do already have a tool to preprocess TTF fonts into a TGA for use in = game rendering of fonts on all platforms. We just wanted to make it = work by being given the TTF as an input file rather than having to = install the font on every machine that needs to the preprocess step. = The preprocess step is part of our automated tool chain so in theory can = be run on any machine in the building. Thanks Mike I will check out the open source engine stuff. But = recentally our legal people came and talked to us and after that = discussion it seems it is easier for us to write it all ourselves. If = we use any external code/tools then we have to ask the legal people = about before hand, which means it usually quicker to write the = code/tools ourselves, arrggghghghgh. Thanks Jake > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Mike Wuetherick > Sent: 24 March 2004 23:16 > To: gam...@li... > Subject: Re: [GD-Windows] Windows true type fonts >=20 >=20 > i think i misunderstood - you are looking to do the conversion on the=20 > fly? this tool is for just converting them to images, but you=20 > should/might be able to use some of the ideas to do the same=20 > on the fly? >=20 > mike w > www.gekidodesigns.com >=20 > Mike Wuetherick wrote: >=20 > > we already have a tool that will convert a truetype image=20 > into a bitmap=20 > > with coordinate data image that can be read by the game to=20 > break the=20 > > single image into individual letters. > >=20 > > the game engine is open-source, so you can grab what you=20 > need/want from=20 > > it ;} > >=20 > > www.realityfactory.ca > >=20 > > cheers > > mike w > > www.gekidodesigns.com > >=20 > >=20 > > Jacob Turner (Core Design Ltd) wrote: > >=20 > >> Writing a tool to output true type fonts as images for use=20 > in game. =20 > >> All is fine the last thing I would like to do is give the=20 > true type=20 > >> font file as an input to the tool rather than having to=20 > install the=20 > >> true type font into the system "fonts" directory. So is there a=20 > >> windows way of opening a true type font and then using it=20 > via GDI or=20 > >> GDIplus drawing commands ? > >> > >> Thanks > >> > >> Jake > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by: IBM Linux Tutorials > >> Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of > >> GenToo technologies. Learn everything from fundamentals to system > >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > >> _______________________________________________ > >> Gamedevlists-windows mailing list > >> Gam...@li... > >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > >> Archives: > >> http://sourceforge.net/mailarchive/forum.php?forum_idU5 > >> > >> > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_idU5 > >=20 > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 |
From: Mike W. <mi...@ge...> - 2004-03-24 23:12:43
|
i think i misunderstood - you are looking to do the conversion on the=20 fly? this tool is for just converting them to images, but you=20 should/might be able to use some of the ideas to do the same on the fly? mike w www.gekidodesigns.com Mike Wuetherick wrote: > we already have a tool that will convert a truetype image into a bitmap= =20 > with coordinate data image that can be read by the game to break the=20 > single image into individual letters. >=20 > the game engine is open-source, so you can grab what you need/want from= =20 > it ;} >=20 > www.realityfactory.ca >=20 > cheers > mike w > www.gekidodesigns.com >=20 >=20 > Jacob Turner (Core Design Ltd) wrote: >=20 >> Writing a tool to output true type fonts as images for use in game. =20 >> All is fine the last thing I would like to do is give the true type=20 >> font file as an input to the tool rather than having to install the=20 >> true type font into the system "fonts" directory. So is there a=20 >> windows way of opening a true type font and then using it via GDI or=20 >> GDIplus drawing commands ? >> >> Thanks >> >> Jake >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IBM Linux Tutorials >> Free Linux tutorial presented by Daniel Robbins, President and CEO of >> GenToo technologies. Learn everything from fundamentals to system >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk >> _______________________________________________ >> Gamedevlists-windows mailing list >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_idU5 >> >> >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 >=20 |
From: Mike W. <mi...@ge...> - 2004-03-24 22:59:40
|
we already have a tool that will convert a truetype image into a bitmap=20 with coordinate data image that can be read by the game to break the=20 single image into individual letters. the game engine is open-source, so you can grab what you need/want from=20 it ;} www.realityfactory.ca cheers mike w www.gekidodesigns.com Jacob Turner (Core Design Ltd) wrote: > Writing a tool to output true type fonts as images for use in game. Al= l is fine the last thing I would like to do is give the true type font fi= le as an input to the tool rather than having to install the true type fo= nt into the system "fonts" directory. So is there a windows way of openi= ng a true type font and then using it via GDI or GDIplus drawing commands= ? >=20 > Thanks >=20 > Jake >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 >=20 |
From: Antonio T. L. <wil...@te...> - 2004-03-24 19:37:32
|
Hi Jake, Check AddFontResource / RemoveFontResource http://msdn.microsoft.com/library/en-us/gdi/fontext_2ylq.asp http://msdn.microsoft.com/library/en-us/gdi/fontext_9r51.asp http://msdn.microsoft.com/library/en-us/gdi/fontext_1m3p.asp > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Jacob Turner (Core Design Ltd) > Sent: Wednesday, March 24, 2004 3:40 AM > To: gam...@li... > Subject: [GD-Windows] Windows true type fonts > > Writing a tool to output true type fonts as images for use in game. All > is fine the last thing I would like to do is give the true type font file > as an input to the tool rather than having to install the true type font > into the system "fonts" directory. So is there a windows way of opening a > true type font and then using it via GDI or GDIplus drawing commands ? > > Thanks > > Jake |
From: Erwin de V. <er...@vo...> - 2004-03-24 14:40:07
|
AddFontResource(FileName) RemoveFontResource(FileName) Erwin ----- Original Message -----=20 From: "Jacob Turner (Core Design Ltd)" <Ja...@Co...> To: <gam...@li...> Sent: Wednesday, March 24, 2004 12:39 PM Subject: [GD-Windows] Windows true type fonts > Writing a tool to output true type fonts as images for use in game. Al= l is fine the last thing I would like to do is give the true type font file= as an input to the tool rather than having to install the true type font int= o the system "fonts" directory. So is there a windows way of opening a tru= e type font and then using it via GDI or GDIplus drawing commands ? > > Thanks > > Jake > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 > > > |
From: <cas...@ya...> - 2004-03-24 14:08:20
|
Jacob Turner (Core Design Ltd) wrote: > Writing a tool to output true type fonts as images for use in game. > All is fine the last thing I would like to do is give the true type > font file as an input to the tool rather than having to install the > true type font into the system "fonts" directory. So is there a > windows way of opening a true type font and then using it via GDI or > GDIplus drawing commands ? I've used freetype to do that and it works fine. Give it a try, it's really easy to use and it's portable at the same time. Hope that helps. -- Ignacio Castaño cas...@ya... |
From: Jacob T. \(C. D. Ltd\) <Ja...@Co...> - 2004-03-24 11:40:40
|
Writing a tool to output true type fonts as images for use in game. All = is fine the last thing I would like to do is give the true type font = file as an input to the tool rather than having to install the true type = font into the system "fonts" directory. So is there a windows way of = opening a true type font and then using it via GDI or GDIplus drawing = commands ? Thanks Jake |
From: Carsten O. <car...@se...> - 2004-03-15 09:04:50
|
Your assumption about every FS using clusters is just plain wrong. I never had real problems with GetDiskFreeSpaceEx(). It may prove to be imprecise on 9x, but I've never seen it fail. If you're dealing with those values, be prepared to handle 1-sector clusters. Because there's such stuff as virtual filesystems. I think you're confusing clusters and sectors. And even sectors do not have to be bigger than 1 byte. There are plenty of schemes that handle allocations on 1-byte boundaries pretty well. And most filesystems do _not_ use linked lists of sectors. If you dig through some of the very fine literature on filesystem design, you'll see that the whole concept of clusters is arbitrary and a clear sign of a design that doesn't fit the amount of data it is trying to handle. Best regards, Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt =20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of tweety > Sent: Monday, March 15, 2004 4:28 AM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > EVERY filesystem is divided in clusters, even CDFS/UDF and linux' > filesystems (reiserfs and... Whatever the normal one is=20 > called, I forgot :) > ), even if they're as small as 1 byte (I personally never=20 > heard of one). > That's because, when adding new parts to a file surrounded by=20 > 2 other files, > you need a way to tell the os where to look for the next part, and you > really can't add a LONGLONG (int64) after every byte... Even=20 > a rle-based > approach would be slow when updating. So they just stuff a=20 > "next pointer" > for each cluster (since most fss store the next pointer at=20 > the beginning, > the macimum number of files/folders/objects etc is limited). > I know deviceiocontrol works differently on w200x/xp, but I=20 > haven't been > able to find out anything but bytes/sector, and I still need=20 > sectors/cluster > or something. > So, now tell me why is it so wrong to expect a function that=20 > receives a path > within the system (on windows it could be an itemidlist) (the path is > required because of the mounting points in wnt+ and linux=20 > etc) and retrieve > the cluster size of that folder (or return false when it=20 > cannot)? I'm not > talking about an os-independent function, I'm talking about a=20 > wrapper of the > different methods to get the cluster size (that's now; if=20 > they would have > thaught of that sooner, they could have written a propper=20 > getclusersize from > the beginning). >=20 > About the null pointer: the first write of a function as=20 > esoteric as my > w9x-compatible getclustersize that uses vxds and=20 > deviceiocontrol really > isn't that centered at handling internally errors, I just=20 > step through it > with the debugger. And I just used the disk in "readonly"=20 > mode, I love my > hard disk too :)) >=20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 >=20 >=20 >=20 > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Carsten Orthbandt > Sent: March 14, 2004 6:43 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 > Erm... Show me _one_ *.vxd on a NT based OS. There ain't none. > DeviceIoControl is _documented_ to be different on NT and 9x. > If you rely on specific behaviour for portable code, you're=20 > doomed. OTOH, > given the wide variety of filesystems on Win32 systems, why=20 > do you expect to > find something like a cluster size at all? Why should it matter? > You either write portable application code and shouldn't have=20 > to resort to > native OS constants. Or you write OS specific code and then=20 > you'll have to > face the differences. And you better know about them. > 9x and NT/2K/XP _are_ different platforms. System information=20 > easily tells > you that. Having nearly the same API on both of them is a=20 > mere convenience, > not a guarantee. >=20 > And: Your code crashes because CreateFile() returned NULL??? > You'd better learn proper error handling before messing with=20 > my hard disk... >=20 > Carsten Orthbandt > Founder + Development Director > SEK SpieleEntwicklungsKombinat GmbH > http://www.sek-ost.de >=20 > Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt >=20 >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of=20 > > tweety > > Sent: Sunday, March 14, 2004 10:37 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > I didn't explain myself properly... I wrote some=20 > deviceiocontrol code=20 > > for wme/w98 and it craches because createfile on vmm32.vxd (or=20 > > whatever) returns null. > > Getdiskfreespace works properly on my machine (then again,=20 > I have 32k=20 > > and 4k clusters...). Still, there should be a function that=20 > works on=20 > > ALL windowses and that returns the cluster size. > >=20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > >=20 > >=20 > >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of=20 > > Carsten Orthbandt > > Sent: March 14, 2004 3:58 AM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > > I'd bet some money on your source being the reason for=20 > crashing. The=20 > > GetDiskFreeSpace API works fine for me on all flavours of Win32. I=20 > > don't think you'll crash XP calling this function, it's your app.=20 > > Generally, Win9x is much more forgiving when it comes to invalid=20 > > memory accesses than the WinNT siblings. Wich is actually a good=20 > > thing. > >=20 > > Carsten Orthbandt > > Founder + Development Director > > SEK SpieleEntwicklungsKombinat GmbH > > http://www.sek-ost.de > >=20 > > Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt > >=20 > >=20 > > > -----Original Message----- > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > tweety > > > Sent: Sunday, March 14, 2004 5:02 AM > > > To: gam...@li... > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > >=20 > > >=20 > > > Ok, I'll try it. Thanks. By the way, I did it in w98/me a=20 > long time=20 > > > ago, it just crashes on xp... :) You know, I find really sad that=20 > > > there's a function in *foxpro* to find the cluster size of > > a drive and > > > there's not ONE thing in the whole windows 32 api to return the=20 > > > cluster size reliably in all operating systems... Maybe=20 > longhorn?... > > >=20 > > > ---------------------------------- > > > Peace and love, > > > Tweety > > > mi...@sy... - twe...@us... > > > YahooID: tweety_04_01 > > >=20 > > > =20 > > >=20 > > > -----Original Message----- > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > Simon O'Connor > > > Sent: March 13, 2004 5:06 PM > > > To: gam...@li... > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > >=20 > > >=20 > > > Hi Tweety, > > >=20 > > >=20 > > > GetDiskFreeSpace() is supported on Windows XP, Windows=20 > 2000, Windows=20 > > > NT, Windows Me, Windows 98, Windows 95, and Windows Server 2003... > > >=20 > > > My comments about 9x were just addressing your preference for a=20 > > > portable method. > > >=20 > > >=20 > > > Cheers, > > >=20 > > > Simon O'Connor > > > Programmer @ Acclaim > > > & Microsoft DirectX MVP > > >=20 > > > > -----Original Message----- > > > > From: gam...@li... > > > > [mailto:gam...@li...] > > > On Behalf Of > > > > tweety > > > > Sent: 13 March 2004 21:55 > > > > To: gam...@li... > > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > > >=20 > > > > I specified in the subject that I'm interested in=20 > finding out the=20 > > > > cluster size (it's not a hint, but not partitionmagic, I'm > > > just trying > > > > to find out the waste of space on my drive) on *xp*, not > > 9x/me. And > > > > I'd really, REALLY, REEEALY preffer not to go to the ddk... > > > >=20 > > > > ---------------------------------- > > > > Peace and love, > > > > Tweety > > > > mi...@sy... - twe...@us... > > > > YahooID: tweety_04_01 > > > >=20 > > > > =20 > > > >=20 > > > > -----Original Message----- > > > > From: gam...@li... > > > > [mailto:gam...@li...] > > > On Behalf Of > > > > Simon O'Connor > > > > Sent: March 13, 2004 4:42 PM > > > > To: gam...@li... > > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > > >=20 > > > >=20 > > > > Hi Tweety, > > > >=20 > > > >=20 > > > > You can use GetDiskFreeSpace() to find the number of=20 > sectors per=20 > > > > cluster and the number of bytes per sector so simply > > > multiply them to > > > > find the size of a cluster. > > > >=20 > > > >=20 > > > > The docs for GetDiskFreeSpace() do mention that the > > returned sectors > > > > per cluster value can be inaccurate under Windows 9x/ME > > for drives > > > > with more than 64 sectors per cluster (the 80Gb drive in > > > this machine > > > > only has 8 per cluster so it might be a fairly unusual case). > > > >=20 > > > > This is probably only an issue for you if your > > application needs to > > > > use this for something more than a "hint" (e.g. if=20 > you're writing=20 > > > > something like PartitionMagic etc). If you do need the totally=20 > > > > accurate value, you could obtain the DDK and take a look at the=20 > > > > Win9x/Me specific FS_GetDiskInfo() function. > > > >=20 > > > > =20 > > > > Cheers, > > > > =20 > > > > Simon O'Connor > > > > Programmer @ Acclaim > > > > & Microsoft DirectX MVP > > > >=20 > > > >=20 > > > > ________________________________ > > > >=20 > > > > From: gam...@li... > > > > [mailto:gam...@li...] > > > On Behalf Of > > > > tweety > > > > Sent: 11 March 2004 23:39 > > > > To: gam...@li... > > > > Subject: [GD-Windows] retrieving the cluster size on xp > > > > =09 > > > > =09 > > > > Can someone please tell me how to get the cluster > > > allocation size in > > >=20 > > > > windowsxp? of course, a portable way is the best, but just > > > 2000/xp is > > > > fine. > > > > i searched the internet far and wide and all i could find > > is how to > > > > find it on fat16/12 partitions and on w95/98/xp. i looked at=20 > > > > deviceiocontrol's functions, but none seems to return the > > > cluster size > > > > or something that i could use... can you tell me? > > > > =20 > > > > ---------------------------------- > > > > Peace and love, > > > > Tweety > > > > mi...@sy... - twe...@us... > > > > YahooID: tweety_04_01 > > > > =09 > > > > =09 > > > >=20 > > > > --- > > > > Incoming mail is certified Virus Free. > > > > Checked by AVG anti-virus system=20 > (http://www.grisoft.com). > > > > Version: 6.0.596 / Virus Database: 379 - Release Date:=20 > > 26/02/2004 > > > > =09 > > > >=20 > > > >=20 > > > > --- > > > > Outgoing mail is certified Virus Free. > > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > > Version: 6.0.596 / Virus Database: 379 - Release Date:=20 > 26/02/2004 > > > > =20 > > > >=20 > > > >=20 > > > >=20 > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials=20 > Free Linux=20 > > > > tutorial presented by Daniel Robbins, President and CEO=20 > of GenToo=20 > > > > technologies. Learn everything from fundamentals to system > > > >=20 > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > > _______________________________________________ > > > > Gamedevlists-windows mailing list=20 > > > > Gam...@li... > > > >=20 > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > > Archives:=20 > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > > >=20 > > > >=20 > > > >=20 > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials=20 > Free Linux=20 > > > > tutorial presented by Daniel Robbins, President and CEO=20 > of GenToo=20 > > > > technologies. Learn everything from fundamentals to system > > > >=20 > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > > _______________________________________________ > > > > Gamedevlists-windows mailing list=20 > > > > Gam...@li... > > > >=20 > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > > Archives:=20 > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > > >=20 > > > > --- > > > > Incoming mail is certified Virus Free. > > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > > Version: 6.0.596 / Virus Database: 379 - Release Date:=20 > 26/02/2004 > > > > =20 > > > >=20 > > >=20 > > > --- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > =20 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > Gamedevlists-windows mailing list > > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > Archives:=20 > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > Gamedevlists-windows mailing list > > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > Archives:=20 > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system=20 > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_idU5 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system=20 > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_idU5 > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > Linux tutorial > presented by Daniel Robbins, President and CEO of GenToo=20 > technologies. Learn > everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 |
From: tweety <mi...@sy...> - 2004-03-15 03:28:29
|
EVERY filesystem is divided in clusters, even CDFS/UDF and linux' filesystems (reiserfs and... Whatever the normal one is called, I forgot = :) ), even if they're as small as 1 byte (I personally never heard of one). That's because, when adding new parts to a file surrounded by 2 other = files, you need a way to tell the os where to look for the next part, and you really can't add a LONGLONG (int64) after every byte... Even a rle-based approach would be slow when updating. So they just stuff a "next = pointer" for each cluster (since most fss store the next pointer at the = beginning, the macimum number of files/folders/objects etc is limited). I know deviceiocontrol works differently on w200x/xp, but I haven't been able to find out anything but bytes/sector, and I still need = sectors/cluster or something. So, now tell me why is it so wrong to expect a function that receives a = path within the system (on windows it could be an itemidlist) (the path is required because of the mounting points in wnt+ and linux etc) and = retrieve the cluster size of that folder (or return false when it cannot)? I'm = not talking about an os-independent function, I'm talking about a wrapper of = the different methods to get the cluster size (that's now; if they would = have thaught of that sooner, they could have written a propper getclusersize = from the beginning). About the null pointer: the first write of a function as esoteric as my w9x-compatible getclustersize that uses vxds and deviceiocontrol really isn't that centered at handling internally errors, I just step through = it with the debugger. And I just used the disk in "readonly" mode, I love = my hard disk too :)) ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Carsten Orthbandt Sent: March 14, 2004 6:43 PM To: gam...@li... Subject: RE: [GD-Windows] retrieving the cluster size on xp Erm... Show me _one_ *.vxd on a NT based OS. There ain't none. DeviceIoControl is _documented_ to be different on NT and 9x. If you rely on specific behaviour for portable code, you're doomed. = OTOH, given the wide variety of filesystems on Win32 systems, why do you = expect to find something like a cluster size at all? Why should it matter? You either write portable application code and shouldn't have to resort = to native OS constants. Or you write OS specific code and then you'll have = to face the differences. And you better know about them. 9x and NT/2K/XP _are_ different platforms. System information easily = tells you that. Having nearly the same API on both of them is a mere = convenience, not a guarantee. And: Your code crashes because CreateFile() returned NULL??? You'd better learn proper error handling before messing with my hard = disk... Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of = > tweety > Sent: Sunday, March 14, 2004 10:37 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > I didn't explain myself properly... I wrote some deviceiocontrol code=20 > for wme/w98 and it craches because createfile on vmm32.vxd (or=20 > whatever) returns null. > Getdiskfreespace works properly on my machine (then again, I have 32k=20 > and 4k clusters...). Still, there should be a function that works on=20 > ALL windowses and that returns the cluster size. >=20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 >=20 >=20 >=20 > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of = > Carsten Orthbandt > Sent: March 14, 2004 3:58 AM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 > I'd bet some money on your source being the reason for crashing. The=20 > GetDiskFreeSpace API works fine for me on all flavours of Win32. I=20 > don't think you'll crash XP calling this function, it's your app.=20 > Generally, Win9x is much more forgiving when it comes to invalid=20 > memory accesses than the WinNT siblings. Wich is actually a good=20 > thing. >=20 > Carsten Orthbandt > Founder + Development Director > SEK SpieleEntwicklungsKombinat GmbH > http://www.sek-ost.de >=20 > Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt >=20 >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...] > On Behalf Of > > tweety > > Sent: Sunday, March 14, 2004 5:02 AM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > Ok, I'll try it. Thanks. By the way, I did it in w98/me a long time=20 > > ago, it just crashes on xp... :) You know, I find really sad that=20 > > there's a function in *foxpro* to find the cluster size of > a drive and > > there's not ONE thing in the whole windows 32 api to return the=20 > > cluster size reliably in all operating systems... Maybe longhorn?... > >=20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > >=20 > > =20 > >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...] > On Behalf Of > > Simon O'Connor > > Sent: March 13, 2004 5:06 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > Hi Tweety, > >=20 > >=20 > > GetDiskFreeSpace() is supported on Windows XP, Windows 2000, Windows = > > NT, Windows Me, Windows 98, Windows 95, and Windows Server 2003... > >=20 > > My comments about 9x were just addressing your preference for a=20 > > portable method. > >=20 > >=20 > > Cheers, > >=20 > > Simon O'Connor > > Programmer @ Acclaim > > & Microsoft DirectX MVP > >=20 > > > -----Original Message----- > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > tweety > > > Sent: 13 March 2004 21:55 > > > To: gam...@li... > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > >=20 > > > I specified in the subject that I'm interested in finding out the=20 > > > cluster size (it's not a hint, but not partitionmagic, I'm > > just trying > > > to find out the waste of space on my drive) on *xp*, not > 9x/me. And > > > I'd really, REALLY, REEEALY preffer not to go to the ddk... > > >=20 > > > ---------------------------------- > > > Peace and love, > > > Tweety > > > mi...@sy... - twe...@us... > > > YahooID: tweety_04_01 > > >=20 > > > =20 > > >=20 > > > -----Original Message----- > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > Simon O'Connor > > > Sent: March 13, 2004 4:42 PM > > > To: gam...@li... > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > >=20 > > >=20 > > > Hi Tweety, > > >=20 > > >=20 > > > You can use GetDiskFreeSpace() to find the number of sectors per=20 > > > cluster and the number of bytes per sector so simply > > multiply them to > > > find the size of a cluster. > > >=20 > > >=20 > > > The docs for GetDiskFreeSpace() do mention that the > returned sectors > > > per cluster value can be inaccurate under Windows 9x/ME > for drives > > > with more than 64 sectors per cluster (the 80Gb drive in > > this machine > > > only has 8 per cluster so it might be a fairly unusual case). > > >=20 > > > This is probably only an issue for you if your > application needs to > > > use this for something more than a "hint" (e.g. if you're writing=20 > > > something like PartitionMagic etc). If you do need the totally=20 > > > accurate value, you could obtain the DDK and take a look at the=20 > > > Win9x/Me specific FS_GetDiskInfo() function. > > >=20 > > > =20 > > > Cheers, > > > =20 > > > Simon O'Connor > > > Programmer @ Acclaim > > > & Microsoft DirectX MVP > > >=20 > > >=20 > > > ________________________________ > > >=20 > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > tweety > > > Sent: 11 March 2004 23:39 > > > To: gam...@li... > > > Subject: [GD-Windows] retrieving the cluster size on xp > > > =09 > > > =09 > > > Can someone please tell me how to get the cluster > > allocation size in > >=20 > > > windowsxp? of course, a portable way is the best, but just > > 2000/xp is > > > fine. > > > i searched the internet far and wide and all i could find > is how to > > > find it on fat16/12 partitions and on w95/98/xp. i looked at=20 > > > deviceiocontrol's functions, but none seems to return the > > cluster size > > > or something that i could use... can you tell me? > > > =20 > > > ---------------------------------- > > > Peace and love, > > > Tweety > > > mi...@sy... - twe...@us... > > > YahooID: tweety_04_01 > > > =09 > > > =09 > > >=20 > > > --- > > > Incoming mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date:=20 > 26/02/2004 > > > =09 > > >=20 > > >=20 > > > --- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > =20 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > Gamedevlists-windows mailing list=20 > > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > Archives:=20 > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > Gamedevlists-windows mailing list=20 > > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > Archives:=20 > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > >=20 > > > --- > > > Incoming mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > =20 > > >=20 > >=20 > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: = http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: = http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > technologies. Learn everything from fundamentals to system=20 > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > technologies. Learn everything from fundamentals to system=20 > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux = tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. = Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Carsten O. <car...@se...> - 2004-03-14 23:43:02
|
Erm... Show me _one_ *.vxd on a NT based OS. There ain't none. DeviceIoControl is _documented_ to be different on NT and 9x. If you rely on specific behaviour for portable code, you're doomed. OTOH, given the wide variety of filesystems on Win32 systems, why do you expect to find something like a cluster size at all? Why should it matter? You either write portable application code and shouldn't have to resort to native OS constants. Or you write OS specific code and then you'll have to face the differences. And you better know about them. 9x and NT/2K/XP _are_ different platforms. System information easily tells you that. Having nearly the same API on both of them is a mere convenience, not a guarantee. And: Your code crashes because CreateFile() returned NULL??? You'd better learn proper error handling before messing with my hard disk... Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of tweety > Sent: Sunday, March 14, 2004 10:37 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > I didn't explain myself properly... I wrote some=20 > deviceiocontrol code for wme/w98 and it craches because=20 > createfile on vmm32.vxd (or whatever) returns null.=20 > Getdiskfreespace works properly on my machine (then again, I=20 > have 32k and 4k clusters...). Still, there should be a=20 > function that works on ALL windowses and that returns the=20 > cluster size. >=20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 >=20 >=20 >=20 > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On=20 > Behalf Of Carsten Orthbandt > Sent: March 14, 2004 3:58 AM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 > I'd bet some money on your source being the reason for=20 > crashing. The GetDiskFreeSpace API works fine for me on all=20 > flavours of Win32. I don't think you'll crash XP calling this=20 > function, it's your app. Generally, Win9x is much more=20 > forgiving when it comes to invalid memory accesses than the=20 > WinNT siblings. Wich is actually a good thing. >=20 > Carsten Orthbandt > Founder + Development Director > SEK SpieleEntwicklungsKombinat GmbH > http://www.sek-ost.de >=20 > Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt >=20 >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of > > tweety > > Sent: Sunday, March 14, 2004 5:02 AM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > Ok, I'll try it. Thanks. By the way, I did it in w98/me a long time > > ago, it just crashes on xp... :) You know, I find really sad that=20 > > there's a function in *foxpro* to find the cluster size of=20 > a drive and=20 > > there's not ONE thing in the whole windows 32 api to return the=20 > > cluster size reliably in all operating systems... Maybe longhorn?... > >=20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > >=20 > > =20 > >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of > > Simon O'Connor > > Sent: March 13, 2004 5:06 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > Hi Tweety, > >=20 > >=20 > > GetDiskFreeSpace() is supported on Windows XP, Windows 2000, Windows > > NT, Windows Me, Windows 98, Windows 95, and Windows Server 2003... > >=20 > > My comments about 9x were just addressing your preference for a > > portable method. > >=20 > >=20 > > Cheers, > >=20 > > Simon O'Connor > > Programmer @ Acclaim > > & Microsoft DirectX MVP > >=20 > > > -----Original Message----- > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > tweety > > > Sent: 13 March 2004 21:55 > > > To: gam...@li... > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > >=20 > > > I specified in the subject that I'm interested in finding out the > > > cluster size (it's not a hint, but not partitionmagic, I'm > > just trying > > > to find out the waste of space on my drive) on *xp*, not=20 > 9x/me. And > > > I'd really, REALLY, REEEALY preffer not to go to the ddk... > > >=20 > > > ---------------------------------- > > > Peace and love, > > > Tweety > > > mi...@sy... - twe...@us... > > > YahooID: tweety_04_01 > > >=20 > > > =20 > > >=20 > > > -----Original Message----- > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > Simon O'Connor > > > Sent: March 13, 2004 4:42 PM > > > To: gam...@li... > > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > >=20 > > >=20 > > > Hi Tweety, > > >=20 > > >=20 > > > You can use GetDiskFreeSpace() to find the number of sectors per > > > cluster and the number of bytes per sector so simply > > multiply them to > > > find the size of a cluster. > > >=20 > > >=20 > > > The docs for GetDiskFreeSpace() do mention that the=20 > returned sectors > > > per cluster value can be inaccurate under Windows 9x/ME=20 > for drives=20 > > > with more than 64 sectors per cluster (the 80Gb drive in > > this machine > > > only has 8 per cluster so it might be a fairly unusual case). > > >=20 > > > This is probably only an issue for you if your=20 > application needs to > > > use this for something more than a "hint" (e.g. if you're writing=20 > > > something like PartitionMagic etc). If you do need the totally=20 > > > accurate value, you could obtain the DDK and take a look at the=20 > > > Win9x/Me specific FS_GetDiskInfo() function. > > >=20 > > > =20 > > > Cheers, > > > =20 > > > Simon O'Connor > > > Programmer @ Acclaim > > > & Microsoft DirectX MVP > > >=20 > > >=20 > > > ________________________________ > > >=20 > > > From: gam...@li... > > > [mailto:gam...@li...] > > On Behalf Of > > > tweety > > > Sent: 11 March 2004 23:39 > > > To: gam...@li... > > > Subject: [GD-Windows] retrieving the cluster size on xp > > > =09 > > > =09 > > > Can someone please tell me how to get the cluster > > allocation size in > >=20 > > > windowsxp? of course, a portable way is the best, but just > > 2000/xp is > > > fine. > > > i searched the internet far and wide and all i could find=20 > is how to > > > find it on fat16/12 partitions and on w95/98/xp. i looked at=20 > > > deviceiocontrol's functions, but none seems to return the > > cluster size > > > or something that i could use... can you tell me? > > > =20 > > > ---------------------------------- > > > Peace and love, > > > Tweety > > > mi...@sy... - twe...@us... > > > YahooID: tweety_04_01 > > > =09 > > > =09 > > >=20 > > > --- > > > Incoming mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date:=20 > 26/02/2004 > > > =09 > > >=20 > > >=20 > > > --- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > =20 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > Gamedevlists-windows mailing list=20 > > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > Archives:=20 > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > > technologies. Learn everything from fundamentals to system > > >=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > Gamedevlists-windows mailing list=20 > > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > Archives:=20 > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > > >=20 > > > --- > > > Incoming mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > =20 > > >=20 > >=20 > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: = http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President > > and CEO of GenToo technologies. Learn everything from=20 > > fundamentals to system=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list=20 > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: = http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 |
From: tweety <mi...@sy...> - 2004-03-14 21:37:30
|
I didn't explain myself properly... I wrote some deviceiocontrol code = for wme/w98 and it craches because createfile on vmm32.vxd (or whatever) = returns null. Getdiskfreespace works properly on my machine (then again, I have = 32k and 4k clusters...). Still, there should be a function that works on ALL windowses and that returns the cluster size. ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Carsten Orthbandt Sent: March 14, 2004 3:58 AM To: gam...@li... Subject: RE: [GD-Windows] retrieving the cluster size on xp I'd bet some money on your source being the reason for crashing. The GetDiskFreeSpace API works fine for me on all flavours of Win32. I don't think you'll crash XP calling this function, it's your app. Generally, Win9x is much more forgiving when it comes to invalid memory accesses than the WinNT siblings. Wich is actually a good thing. Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of = > tweety > Sent: Sunday, March 14, 2004 5:02 AM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > Ok, I'll try it. Thanks. By the way, I did it in w98/me a long time=20 > ago, it just crashes on xp... :) You know, I find really sad that=20 > there's a function in *foxpro* to find the cluster size of a drive and = > there's not ONE thing in the whole windows 32 api to return the=20 > cluster size reliably in all operating systems... Maybe longhorn?... >=20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 >=20 > =20 >=20 > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of = > Simon O'Connor > Sent: March 13, 2004 5:06 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > Hi Tweety, >=20 >=20 > GetDiskFreeSpace() is supported on Windows XP, Windows 2000, Windows=20 > NT, Windows Me, Windows 98, Windows 95, and Windows Server 2003... >=20 > My comments about 9x were just addressing your preference for a=20 > portable method. >=20 >=20 > Cheers, >=20 > Simon O'Connor > Programmer @ Acclaim > & Microsoft DirectX MVP >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...] > On Behalf Of > > tweety > > Sent: 13 March 2004 21:55 > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > > I specified in the subject that I'm interested in finding out the=20 > > cluster size (it's not a hint, but not partitionmagic, I'm > just trying > > to find out the waste of space on my drive) on *xp*, not 9x/me. And=20 > > I'd really, REALLY, REEEALY preffer not to go to the ddk... > >=20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > >=20 > > =20 > >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...] > On Behalf Of > > Simon O'Connor > > Sent: March 13, 2004 4:42 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > Hi Tweety, > >=20 > >=20 > > You can use GetDiskFreeSpace() to find the number of sectors per=20 > > cluster and the number of bytes per sector so simply > multiply them to > > find the size of a cluster. > >=20 > >=20 > > The docs for GetDiskFreeSpace() do mention that the returned sectors = > > per cluster value can be inaccurate under Windows 9x/ME for drives=20 > > with more than 64 sectors per cluster (the 80Gb drive in > this machine > > only has 8 per cluster so it might be a fairly unusual case). > >=20 > > This is probably only an issue for you if your application needs to=20 > > use this for something more than a "hint" (e.g. if you're writing=20 > > something like PartitionMagic etc). If you do need the totally=20 > > accurate value, you could obtain the DDK and take a look at the=20 > > Win9x/Me specific FS_GetDiskInfo() function. > >=20 > > =20 > > Cheers, > > =20 > > Simon O'Connor > > Programmer @ Acclaim > > & Microsoft DirectX MVP > >=20 > >=20 > > ________________________________ > >=20 > > From: gam...@li... > > [mailto:gam...@li...] > On Behalf Of > > tweety > > Sent: 11 March 2004 23:39 > > To: gam...@li... > > Subject: [GD-Windows] retrieving the cluster size on xp > > =09 > > =09 > > Can someone please tell me how to get the cluster > allocation size in >=20 > > windowsxp? of course, a portable way is the best, but just > 2000/xp is > > fine. > > i searched the internet far and wide and all i could find is how to=20 > > find it on fat16/12 partitions and on w95/98/xp. i looked at=20 > > deviceiocontrol's functions, but none seems to return the > cluster size > > or something that i could use... can you tell me? > > =20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > > =09 > > =09 > >=20 > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: > > 26/02/2004 > > =09 > >=20 > >=20 > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 >=20 > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > =20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > technologies. Learn everything from fundamentals to system=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of GenToo technologies. Learn everything from=20 > fundamentals to system=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list=20 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Carsten O. <car...@se...> - 2004-03-14 08:58:14
|
I'd bet some money on your source being the reason for crashing. The GetDiskFreeSpace API works fine for me on all flavours of Win32. I don't think you'll crash XP calling this function, it's your app. Generally, Win9x is much more forgiving when it comes to invalid memory accesses than the WinNT siblings. Wich is actually a good thing. Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of tweety > Sent: Sunday, March 14, 2004 5:02 AM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > Ok, I'll try it. Thanks. By the way, I did it in w98/me a=20 > long time ago, it just crashes on xp... :) You know, I find=20 > really sad that there's a function in *foxpro* to find the=20 > cluster size of a drive and there's not ONE thing in the=20 > whole windows 32 api to return the cluster size reliably in=20 > all operating systems... Maybe longhorn?... >=20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 >=20 > =20 >=20 > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On=20 > Behalf Of Simon O'Connor > Sent: March 13, 2004 5:06 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp >=20 >=20 > Hi Tweety, >=20 >=20 > GetDiskFreeSpace() is supported on Windows XP, Windows 2000,=20 > Windows NT, Windows Me, Windows 98, Windows 95, and Windows=20 > Server 2003... >=20 > My comments about 9x were just addressing your preference for=20 > a portable method. >=20 >=20 > Cheers, >=20 > Simon O'Connor > Programmer @ Acclaim > & Microsoft DirectX MVP=20 >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of > > tweety > > Sent: 13 March 2004 21:55 > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > > I specified in the subject that I'm interested in finding out the > > cluster size (it's not a hint, but not partitionmagic, I'm=20 > just trying=20 > > to find out the waste of space on my drive) on *xp*, not 9x/me. And=20 > > I'd really, REALLY, REEEALY preffer not to go to the ddk... > >=20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > >=20 > > =20 > >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of > > Simon O'Connor > > Sent: March 13, 2004 4:42 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] retrieving the cluster size on xp > >=20 > >=20 > > Hi Tweety, > >=20 > >=20 > > You can use GetDiskFreeSpace() to find the number of sectors per > > cluster and the number of bytes per sector so simply=20 > multiply them to=20 > > find the size of a cluster. > >=20 > >=20 > > The docs for GetDiskFreeSpace() do mention that the returned sectors > > per cluster value can be inaccurate under Windows 9x/ME for drives=20 > > with more than 64 sectors per cluster (the 80Gb drive in=20 > this machine=20 > > only has 8 per cluster so it might be a fairly unusual case). > >=20 > > This is probably only an issue for you if your application needs to > > use this for something more than a "hint" (e.g. if you're writing=20 > > something like PartitionMagic etc). If you do need the totally=20 > > accurate value, you could obtain the DDK and take a look at the=20 > > Win9x/Me specific FS_GetDiskInfo() function. > >=20 > > =20 > > Cheers, > > =20 > > Simon O'Connor > > Programmer @ Acclaim > > & Microsoft DirectX MVP > >=20 > >=20 > > ________________________________ > >=20 > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of > > tweety > > Sent: 11 March 2004 23:39 > > To: gam...@li... > > Subject: [GD-Windows] retrieving the cluster size on xp > > =09 > > =09 > > Can someone please tell me how to get the cluster=20 > allocation size in >=20 > > windowsxp? of course, a portable way is the best, but just=20 > 2000/xp is > > fine. > > i searched the internet far and wide and all i could find is how to=20 > > find it on fat16/12 partitions and on w95/98/xp. i looked at=20 > > deviceiocontrol's functions, but none seems to return the=20 > cluster size=20 > > or something that i could use... can you tell me? > > =20 > > ---------------------------------- > > Peace and love, > > Tweety > > mi...@sy... - twe...@us... > > YahooID: tweety_04_01 > > =09 > > =09 > >=20 > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: > > 26/02/2004 > > =09 > >=20 > >=20 > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free > > Linux tutorial presented by Daniel Robbins, President and CEO=20 > > of GenToo technologies. Learn everything from fundamentals to=20 > > system=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > >=20 > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 >=20 > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > =20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of GenToo technologies. Learn everything from=20 > fundamentals to system=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list=20 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of GenToo technologies. Learn everything from=20 > fundamentals to system=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list=20 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 |