dev-cpp-users Mailing List for Dev-C++ (Page 691)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Brian C. B. <bcb...@ya...> - 2001-06-19 11:26:13
|
Hi,
Thank you for this code, it appears to work correctly with GCC.
Sincerely,
Brian
"Shall we accept good from God, and not trouble?" Job 2:10
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Elias
Pschernig
Sent: Monday, June 18, 2001 5:17 PM
To: dev...@li...
Subject: Re: [Dev-C++] Reading GCC output
> I apologize for not being clear. I am coding a small IDE that invokes
the GCC compiler, just
> like Dev-C++ does. Dev-C++ catches the output produced by GCC and displays
the errors,
> warnings, and other GCC output at the bottom of the program. I would like
to know how to do
> just that: invoke GCC from my program, catch the output, and display it. I
know how to invoke
> GCC and display any output, but I do not know how to catch the output.
Could someone point me
> in the right direction? Thanks in advance.
Hi, i don't know why the source code you posted doesn't work. I'm using
basically the same code in my programs. The program below works fine for me
under win98, i'm using the code to catch output for another program, but it
seems to work with 'gcc' just the same.
I didn't look at your code in detail, but it's almost the same procedure:
Cerate a temporary file, redirect the output from the called command into
that file, then read the contents of the temporary file and delete the file.
I compiled with 'gcc -mwindows -O3 -s -o catch.exe catch.c', but should of
course work with a dev-c++ project as well.
(Warning: This code may contain all sort of mistakes and bugs)(but i hope it
does work)
Elias Pschernig
-- catch.c
#include <windows.h>
void execute(char *command) {
char tempdir[1024];
char tempfile[1024];
STARTUPINFO sui;
PROCESS_INFORMATION pi;
HANDLE capture;
GetTempPath(1024, tempdir);
GetTempFileName(tempdir, "bla", 0, tempfile);
capture=CreateFile(tempfile,GENERIC_READ|GENERIC_WRITE,0,NULL,
CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY,NULL);
memset(&sui,0,sizeof sui);
sui.cb = sizeof sui;
sui.lpTitle = "my redir";
sui.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
sui.hStdOutput = capture;
sui.hStdError = capture;
sui.hStdInput = NULL;
sui.wShowWindow = SW_HIDE;
if(CreateProcess(NULL, command,
NULL, NULL, TRUE, 0, NULL, tempdir, &sui, &pi)) {
char *buffer;
DWORD size;
WaitForSingleObject(pi.hProcess, INFINITE);
SetFilePointer(capture, 0, NULL, FILE_BEGIN);
size = GetFileSize(capture, NULL);
buffer = alloca(size+1);
ReadFile(capture, buffer, size, &size, NULL);
buffer[size] = 0;
CloseHandle(capture);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
DeleteFile(tempfile);
MessageBox(NULL,buffer,"Captured Output",MB_OK);
} else {
MessageBox(NULL,command,"Error: Could not execute",MB_OK);
}
}
int WINAPI WinMain(HINSTANCE hinst,HINSTANCE prev,LPSTR arg,int show) {
execute("gcc -v");
return 0;
}
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
---
Incoming mail is certified Virus Free by AVG
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
---
Outgoing mail is certified Virus Free by AVG
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net
|
|
From: <ti...@ne...> - 2001-06-19 07:32:53
|
Thank you very much for all your help on version checking. Specially Steve Perkins and Bruno Berteau Cheers Folks tim |
|
From: Michael P. <mdp...@ya...> - 2001-06-19 02:56:26
|
Try
http://www.gamedev.net/
--- Brasier <br...@Pu...> wrote:
> I am very new to Game proramming and i have only
> learned from a website how to make the hi/low guess
> the number game which is very basic and i was just
> wondering if anyone knew any more advanced training
> web sites that teach you how to put in Sprites and
> how to make them collide E.T.C i hope this is all
> making sense as i only kind of know what im
> saying...lol
>
> Also in C++ how do you let the player pause the game
> (and when he/she does pause that it goes to an
> animation???
>
> Thanks for your help (in advance)
>
> I hope to one day be a great programmer but we all
> have to start somewhere right?!
>
> Thakns again
>
> Steve.B
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
>
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/
|
|
From: Brasier <br...@Pu...> - 2001-06-18 23:38:08
|
I am very new to Game proramming and i have only learned from a website how to make the hi/low guess the number game which is very basic and i was just wondering if anyone knew any more advanced training web sites that teach you how to put in Sprites and how to make them collide E.T.C i hope this is all making sense as i only kind of know what im saying...lol Also in C++ how do you let the player pause the game (and when he/she does pause that it goes to an animation??? Thanks for your help (in advance) I hope to one day be a great programmer but we all have to start somewhere right?! Thakns again Steve.B |
|
From: Elias P. <eli...@ao...> - 2001-06-18 21:17:27
|
> I apologize for not being clear. I am coding a small IDE that invokes the GCC compiler, just
> like Dev-C++ does. Dev-C++ catches the output produced by GCC and displays the errors,
> warnings, and other GCC output at the bottom of the program. I would like to know how to do
> just that: invoke GCC from my program, catch the output, and display it. I know how to invoke
> GCC and display any output, but I do not know how to catch the output. Could someone point me
> in the right direction? Thanks in advance.
Hi, i don't know why the source code you posted doesn't work. I'm using basically the same code in my programs. The program below works fine for me under win98, i'm using the code to catch output for another program, but it seems to work with 'gcc' just the same.
I didn't look at your code in detail, but it's almost the same procedure:
Cerate a temporary file, redirect the output from the called command into that file, then read the contents of the temporary file and delete the file.
I compiled with 'gcc -mwindows -O3 -s -o catch.exe catch.c', but should of course work with a dev-c++ project as well.
(Warning: This code may contain all sort of mistakes and bugs)(but i hope it does work)
Elias Pschernig
-- catch.c
#include <windows.h>
void execute(char *command) {
char tempdir[1024];
char tempfile[1024];
STARTUPINFO sui;
PROCESS_INFORMATION pi;
HANDLE capture;
GetTempPath(1024, tempdir);
GetTempFileName(tempdir, "bla", 0, tempfile);
capture=CreateFile(tempfile,GENERIC_READ|GENERIC_WRITE,0,NULL,
CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY,NULL);
memset(&sui,0,sizeof sui);
sui.cb = sizeof sui;
sui.lpTitle = "my redir";
sui.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
sui.hStdOutput = capture;
sui.hStdError = capture;
sui.hStdInput = NULL;
sui.wShowWindow = SW_HIDE;
if(CreateProcess(NULL, command,
NULL, NULL, TRUE, 0, NULL, tempdir, &sui, &pi)) {
char *buffer;
DWORD size;
WaitForSingleObject(pi.hProcess, INFINITE);
SetFilePointer(capture, 0, NULL, FILE_BEGIN);
size = GetFileSize(capture, NULL);
buffer = alloca(size+1);
ReadFile(capture, buffer, size, &size, NULL);
buffer[size] = 0;
CloseHandle(capture);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
DeleteFile(tempfile);
MessageBox(NULL,buffer,"Captured Output",MB_OK);
} else {
MessageBox(NULL,command,"Error: Could not execute",MB_OK);
}
}
int WINAPI WinMain(HINSTANCE hinst,HINSTANCE prev,LPSTR arg,int show) {
execute("gcc -v");
return 0;
}
|
|
From: Bruno B. <bbe...@cl...> - 2001-06-18 20:58:47
|
Hi !
Here is a sample code for version checking:
#include <stdio.h>
#include <windows.h>
#include <winreg.h>
#define BufferSize 255
void NoAR()
{
printf("Acrobat Reader is not installed\n");
exit();
}
int main(int argc, char *argv[])
{
PHKEY hKey, hKeyAdobe,hKeyAcrobatR;
LONG Result;
WORD iSubKey=0;
char Buffer[BufferSize];
/* check for the key "software" */
Result=RegOpenKeyEx(HKEY_LOCAL_MACHINE,"software",0,KEY_READ,&hKey);
/* all right then look for the "Adobe" subkey */
if (Result==ERROR_SUCCESS)
{
Result=RegOpenKeyEx(hKey,"Adobe",0,KEY_READ,&hKeyAdobe);
if (Result!=ERROR_SUCCESS) NoAR();
Result=RegOpenKeyEx(hKeyAdobe,"Acrobat Reader",0,KEY_READ,&hKeyAcrobatR);
if (Result!=ERROR_SUCCESS) NoAR();
/*print all the subkeys */
while(Result!=ERROR_NO_MORE_ITEMS)
{
Result=RegEnumKey(hKeyAcrobatR,iSubKey, Buffer, BufferSize);
printf("%s\n", Buffer);
iSubKey++;
};
}
else printf("No Software key\n");
return 0;
}
|
|
From: Brian C. B. <bcb...@ya...> - 2001-06-18 20:10:57
|
Hi,
I apologize for not being clear. I am coding a small IDE that invokes the
GCC compiler, just like Dev-C++ does. Dev-C++ catches the output produced by
GCC and displays the errors, warnings, and other GCC output at the bottom of
the program. I would like to know how to do just that: invoke GCC from my
program, catch the output, and display it. I know how to invoke GCC and
display any output, but I do not know how to catch the output. Could someone
point me in the right direction? Thanks in advance.
Sincerely,
Brian
"Shall we accept good from God, and not trouble?" Job 2:10
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Steve D.
Perkins
Sent: Monday, June 18, 2001 1:10 PM
To: dev...@li...
Subject: Re: [Dev-C++] Reading GCC output
Umm... write a program called 'foo.cpp', compile it to form 'foo.exe',
go to a command-prompt and type:
c:\YourDir\foo.exe > YourOutputFile.txt
"Piping" isn't something you do at compile-time, it's something you do
at run-time... to direct an application's input and/or output to or from a
location other than it was coded for at compile-time.
Cheers,
Steve
----- Original Message -----
From: Brian C. Becker
To: devcpp
Sent: Monday, June 18, 2001 12:03 PM
Subject: [Dev-C++] Reading GCC output
Hi,
I am trying to read the output of the gcc compiler like Bloodshed
Dev-C++ does and am not being successful. I tried looking in the online gcc
manual for command line options that might direct the output into a file,
but did not find such an option. I also read that gcc uses temp files to
communicate between the compiler, assembler, linker, etc, but could not find
any information on how to find those files to read them. I also tried the
using the "-pipe" command and that did not work; I also tried the following
code to pipe the output into my program. It works for other console programs
but outputs garbage when I try to read the output of gcc (perhaps because
gcc calles other proccesses? ):
long i;
HANDLE rh;
HANDLE wh;
STARTUPINFO stinfo;
PROCESS_INFORMATION pinfo;
DWORD bytesread;
char buf[65536];
SECURITY_ATTRIBUTES sattr;
akostring output;
HANDLE oldwh;
ZeroMemory(&sattr, sizeof(SECURITY_ATTRIBUTES));
sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
sattr.lpSecurityDescriptor = 0;
sattr.bInheritHandle = true;
CreatePipe(&rh, &wh, &sattr, 0);
oldwh = GetStdHandle(STD_OUTPUT_HANDLE);
SetStdHandle(STD_OUTPUT_HANDLE, wh);
ZeroMemory(&stinfo, sizeof(STARTUPINFO));
stinfo.cb = sizeof(STARTUPINFO);
stinfo.lpReserved = 0;
stinfo.lpReserved2 = 0;
stinfo.cbReserved2 = 0 ;
stinfo.lpDesktop = 0;
stinfo.lpTitle = 0;
stinfo.dwFlags = STARTF_USESHOWWINDOW;
stinfo.wShowWindow = SW_HIDE;
if(!CreateProcess(0, "C:\\WINDOWS\\TEMP\\AkoClass\\compiler\\bin\\g++
\"C:\\WINDOWS\\TEMP\\AKOCLASS\\OUTPUT.cpp\" -c -s -mwindows -O1 -O3 -fexpens
ive-optimizations -IC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\ -IC:\\W
INDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\G__~1 -IC:\\WINDOWS\\TEMP\\AkoCla
ss\\compiler\\INCLUDE\\ -LC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\LIB\\ -BC:\
\WINDOWS\\TEMP\\AkoClass\\compiler\\BIN", 0, 0, false, CREATE_NEW_CONSOLE |
NORMAL_PRIORITY_CLASS, 0,0, &stinfo, &pinfo)){
MessageBox(0,"Error","Failed",0);
}
else{
WaitForSingleObject(pinfo.hProcess, INFINITE );
CloseHandle(wh);
SetStdHandle(STD_OUTPUT_HANDLE, oldwh);
output = "";
ReadFile(rh, &buf, 65536, &bytesread, NULL);
output = (char*) &buf;
CloseHandle(pinfo.hProcess);
CloseHandle( pinfo.hThread );
}
//Note: akostring is a string class.
// output now contains garbage or nothing
Could anybody help me with this problem? Thanks in advance.
Sincerely,
Brian
"Shall we accept good from God, and not trouble?" Job 2:10
---
Outgoing mail is certified Virus Free by AVG
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
|
|
From: Bruno B. <bbe...@cl...> - 2001-06-18 19:30:31
|
The RegOpenKey function can help you.
The RegOpenKeyEx function opens the specified key.
LONG RegOpenKeyEx(
HKEY hKey, // handle of open key
LPCTSTR lpszSubKey, // address of name of subkey to open
DWORD dwReserved, // reserved
REGSAM samDesired, // security access mask
PHKEY phkResult // address of handle of open key
);
Parameters
hKey
Identifies a currently open key or any of the following predefined
reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
lpszSubKey
Points to a null-terminated string containing the name of the subkey to
open. If this parameter is NULL or a pointer to an empty string, the
function will open a new handle of the key identified by the hKey
parameter. In this case, the function will not close the handles
previously opened.
dwReserved
Reserved; must be zero.
samDesired
Specifies an access mask that describes the desired security access for
the new key. This parameter can be a combination of the following
values:
Value Meaning
KEY_ALL_ACCESS Combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS,
KEY_NOTIFY, KEY_CREATE_SUB_KEY, KEY_CREATE_LINK, and KEY_SET_VALUE
access.
KEY_CREATE_LINK Permission to create a symbolic link.
KEY_CREATE_SUB_KEY Permission to create subkeys.
KEY_ENUMERATE_SUB_KEYS Permission to enumerate subkeys.
KEY_EXECUTE Permission for read access.
KEY_NOTIFY Permission for change notification.
KEY_QUERY_VALUE Permission to query subkey data.
KEY_READ Combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and
KEY_NOTIFY access.
KEY_SET_VALUE Permission to set subkey data.
KEY_WRITE Combination of KEY_SET_VALUE and KEY_CREATE_SUB_KEY access.
phkResult
Points to a variable that receives the handle of the opened key.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is an error value.
Bruno Berteau
http://perso.club-internet.fr/bberteau
|
|
From: Steve D. P. <ste...@ho...> - 2001-06-18 17:13:35
|
Umm... write a program called 'foo.cpp', compile it to form =
'foo.exe', go to a command-prompt and type:
c:\YourDir\foo.exe > YourOutputFile.txt
"Piping" isn't something you do at compile-time, it's something you =
do at run-time... to direct an application's input and/or output to or =
from a location other than it was coded for at compile-time.
Cheers,
Steve
----- Original Message -----=20
From: Brian C. Becker=20
To: devcpp=20
Sent: Monday, June 18, 2001 12:03 PM
Subject: [Dev-C++] Reading GCC output
Hi,
I am trying to read the output of the gcc compiler like Bloodshed =
Dev-C++ does and am not being successful. I tried looking in the online =
gcc manual for command line options that might direct the output into a =
file, but did not find such an option. I also read that gcc uses temp =
files to communicate between the compiler, assembler, linker, etc, but =
could not find any information on how to find those files to read them. =
I also tried the using the "-pipe" command and that did not work; I =
also tried the following code to pipe the output into my program. It =
works for other console programs but outputs garbage when I try to read =
the output of gcc (perhaps because gcc calles other proccesses? ):
long i;
HANDLE rh;
HANDLE wh;
STARTUPINFO stinfo;
PROCESS_INFORMATION pinfo;
DWORD bytesread;
char buf[65536];
SECURITY_ATTRIBUTES sattr;
akostring output;
HANDLE oldwh;
ZeroMemory(&sattr, sizeof(SECURITY_ATTRIBUTES));
sattr.nLength =3D sizeof(SECURITY_ATTRIBUTES);
sattr.lpSecurityDescriptor =3D 0;
sattr.bInheritHandle =3D true;
CreatePipe(&rh, &wh, &sattr, 0);
oldwh =3D GetStdHandle(STD_OUTPUT_HANDLE);
SetStdHandle(STD_OUTPUT_HANDLE, wh);
ZeroMemory(&stinfo, sizeof(STARTUPINFO));
stinfo.cb =3D sizeof(STARTUPINFO);
stinfo.lpReserved =3D 0;
stinfo.lpReserved2 =3D 0;
stinfo.cbReserved2 =3D 0 ;
stinfo.lpDesktop =3D 0;
stinfo.lpTitle =3D 0;
stinfo.dwFlags =3D STARTF_USESHOWWINDOW;
stinfo.wShowWindow =3D SW_HIDE;
if(!CreateProcess(0, "C:\\WINDOWS\\TEMP\\AkoClass\\compiler\\bin\\g++ =
\"C:\\WINDOWS\\TEMP\\AKOCLASS\\OUTPUT.cpp\" -c -s -mwindows -O1 -O3 =
-fexpensive-optimizations =
-IC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\ =
-IC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\G__~1 =
-IC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\ =
-LC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\LIB\\ =
-BC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\BIN", 0, 0, false, =
CREATE_NEW_CONSOLE | NORMAL_PRIORITY_CLASS, 0,0, &stinfo, &pinfo)){
MessageBox(0,"Error","Failed",0);
}
else{
WaitForSingleObject(pinfo.hProcess, INFINITE );
CloseHandle(wh);
SetStdHandle(STD_OUTPUT_HANDLE, oldwh);
output =3D "";
ReadFile(rh, &buf, 65536, &bytesread, NULL);
output =3D (char*) &buf;
CloseHandle(pinfo.hProcess);
CloseHandle( pinfo.hThread );
}
//Note: akostring is a string class.
// output now contains garbage or nothing
Could anybody help me with this problem? Thanks in advance.
Sincerely,
Brian
"Shall we accept good from God, and not trouble?" Job 2:10
|
|
From: Steve D. P. <ste...@ho...> - 2001-06-18 17:09:29
|
I don't have first-hand experience with using any library that = provides for Windows registry manipulation... but I do have Acrobat = Reader installed on my hard drive, and immediately found the registry = key: \\HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader Cheers, Steve ----- Original Message -----=20 From: tim@netfactoriel=20 To: devcpp=20 Sent: Monday, June 18, 2001 5:57 AM Subject: [Dev-C++] More Version checking thanks Derek for the reply. I imagined it would probably have = something to do with the registry, but i checked through everything in = the regedit.exe program but acrobat reader doesn't seem to have a = version value. Can you or anybody else think of another technic? And do = you know how to get values from the registry thanks for you time everyone tim |
|
From: Brian C. B. <bcb...@ya...> - 2001-06-18 16:04:26
|
Hi,
I am trying to read the output of the gcc compiler like Bloodshed Dev-C++
does and am not being successful. I tried looking in the online gcc manual
for command line options that might direct the output into a file, but did
not find such an option. I also read that gcc uses temp files to communicate
between the compiler, assembler, linker, etc, but could not find any
information on how to find those files to read them. I also tried the using
the "-pipe" command and that did not work; I also tried the following code
to pipe the output into my program. It works for other console programs but
outputs garbage when I try to read the output of gcc (perhaps because gcc
calles other proccesses? ):
long i;
HANDLE rh;
HANDLE wh;
STARTUPINFO stinfo;
PROCESS_INFORMATION pinfo;
DWORD bytesread;
char buf[65536];
SECURITY_ATTRIBUTES sattr;
akostring output;
HANDLE oldwh;
ZeroMemory(&sattr, sizeof(SECURITY_ATTRIBUTES));
sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
sattr.lpSecurityDescriptor = 0;
sattr.bInheritHandle = true;
CreatePipe(&rh, &wh, &sattr, 0);
oldwh = GetStdHandle(STD_OUTPUT_HANDLE);
SetStdHandle(STD_OUTPUT_HANDLE, wh);
ZeroMemory(&stinfo, sizeof(STARTUPINFO));
stinfo.cb = sizeof(STARTUPINFO);
stinfo.lpReserved = 0;
stinfo.lpReserved2 = 0;
stinfo.cbReserved2 = 0 ;
stinfo.lpDesktop = 0;
stinfo.lpTitle = 0;
stinfo.dwFlags = STARTF_USESHOWWINDOW;
stinfo.wShowWindow = SW_HIDE;
if(!CreateProcess(0, "C:\\WINDOWS\\TEMP\\AkoClass\\compiler\\bin\\g++
\"C:\\WINDOWS\\TEMP\\AKOCLASS\\OUTPUT.cpp\" -c -s -mwindows -O1 -O3 -fexpens
ive-optimizations -IC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\ -IC:\\W
INDOWS\\TEMP\\AkoClass\\compiler\\INCLUDE\\G__~1 -IC:\\WINDOWS\\TEMP\\AkoCla
ss\\compiler\\INCLUDE\\ -LC:\\WINDOWS\\TEMP\\AkoClass\\compiler\\LIB\\ -BC:\
\WINDOWS\\TEMP\\AkoClass\\compiler\\BIN", 0, 0, false, CREATE_NEW_CONSOLE |
NORMAL_PRIORITY_CLASS, 0,0, &stinfo, &pinfo)){
MessageBox(0,"Error","Failed",0);
}
else{
WaitForSingleObject(pinfo.hProcess, INFINITE );
CloseHandle(wh);
SetStdHandle(STD_OUTPUT_HANDLE, oldwh);
output = "";
ReadFile(rh, &buf, 65536, &bytesread, NULL);
output = (char*) &buf;
CloseHandle(pinfo.hProcess);
CloseHandle( pinfo.hThread );
}
//Note: akostring is a string class.
// output now contains garbage or nothing
Could anybody help me with this problem? Thanks in advance.
Sincerely,
Brian
"Shall we accept good from God, and not trouble?" Job 2:10
---
Outgoing mail is certified Virus Free by AVG
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
|
|
From: <ti...@ne...> - 2001-06-18 10:06:14
|
thanks Derek for the reply. I imagined it would probably have something = to do with the registry, but i checked through everything in the = regedit.exe program but acrobat reader doesn't seem to have a version = value. Can you or anybody else think of another technic? And do you = know how to get values from the registry thanks for you time everyone tim |
|
From: Johannes P. <joh...@pr...> - 2001-06-18 09:03:23
|
Hi there Stein Nyg=E5rd -=3D-=3D-=3D-=3D-=3D-=3D I wonder if you have tried PC Game programmers Encyclopedia. They have=20 tutrials that teach you all this. If you havent go to : http://www.qzx.com/pc-gpe/ or look at these sites for sample code or tutorials http://www.ddj.com or http://www.qzx.com They are pretty good. Also what kind of game is this for if a 3D game .=20 Michela Abresh has written a book on Graphics programming that is for Free. (He helped write Quake, did the optimixation of the=20 graphics).. It is at : http://www.ddj.com/articles/2001/0165/0165f/0165f.htm Well I hope some if this helps.. If you dont come right and you can take=20 attachments. I can send you some Files. or Tutrials. that may help. Well good luck Johannes or At 02:30 17/06/2001 +0200, you wrote: >Thanks alot... I'l try it out, but I don't think it'l work, since im using= =20 >the old fashion Turbo C++ 3.0 :( >----- Original Message ----- >From: <mailto:ca...@op...>Andre` Niel Cameron >To:=20 ><mailto:dev...@li...>dev...@li...= .net=20 > >Sent: Saturday, June 16, 2001 11:51 PM >Subject: Re: [Dev-C++] Please help me; wave-sounds in DOS? > >are you running in win 9X? as a console app? if so goto=20 ><http://www.fmod.org>www.fmod.org use that sound api. >----- Original Message ----- >From: <mailto:ste...@ge...>Stein Nyg=E5rd >To:=20 ><mailto:dev...@li...>dev...@li...= .net=20 > >Sent: Saturday, June 16, 2001 5:42 PM >Subject: [Dev-C++] Please help me; wave-sounds in DOS? > >There's gotta be someone who can help me with this! >I really need to play some sounds in my DOS-programs. > >I really would appreciate, if someone could help me :) > ><mailto:Stein@c>Stein@c++ |
|
From: Andre` N. C. <ca...@op...> - 2001-06-17 14:59:43
|
Well, it might work I have never used turbo c. Go get Bloodshed Dev 4 =
its free:)
----- Original Message -----=20
From: Stein Nyg=E5rd=20
To: dev...@li...=20
Sent: Saturday, June 16, 2001 8:30 PM
Subject: Re: [Dev-C++] Please help me; wave-sounds in DOS?
Thanks alot... I'l try it out, but I don't think it'l work, since im =
using the old fashion Turbo C++ 3.0 :(
----- Original Message -----=20
From: Andre` Niel Cameron=20
To: dev...@li...=20
Sent: Saturday, June 16, 2001 11:51 PM
Subject: Re: [Dev-C++] Please help me; wave-sounds in DOS?
are you running in win 9X? as a console app? if so goto =
www.fmod.org use that sound api.
----- Original Message -----=20
From: Stein Nyg=E5rd=20
To: dev...@li...=20
Sent: Saturday, June 16, 2001 5:42 PM
Subject: [Dev-C++] Please help me; wave-sounds in DOS?
There's gotta be someone who can help me with this!
I really need to play some sounds in my DOS-programs.
I really would appreciate, if someone could help me :)
Stein@c++
|
|
From: <ste...@ge...> - 2001-06-17 00:30:29
|
Thanks alot... I'l try it out, but I don't think it'l work, since im = using the old fashion Turbo C++ 3.0 :( ----- Original Message -----=20 From: Andre` Niel Cameron=20 To: dev...@li...=20 Sent: Saturday, June 16, 2001 11:51 PM Subject: Re: [Dev-C++] Please help me; wave-sounds in DOS? are you running in win 9X? as a console app? if so goto www.fmod.org = use that sound api. ----- Original Message -----=20 From: Stein Nyg=E5rd=20 To: dev...@li...=20 Sent: Saturday, June 16, 2001 5:42 PM Subject: [Dev-C++] Please help me; wave-sounds in DOS? There's gotta be someone who can help me with this! I really need to play some sounds in my DOS-programs. I really would appreciate, if someone could help me :) Stein@c++ |
|
From: Andre` N. C. <ca...@op...> - 2001-06-16 21:49:41
|
are you running in win 9X? as a console app? if so goto www.fmod.org = use that sound api. ----- Original Message -----=20 From: Stein Nyg=E5rd=20 To: dev...@li...=20 Sent: Saturday, June 16, 2001 5:42 PM Subject: [Dev-C++] Please help me; wave-sounds in DOS? There's gotta be someone who can help me with this! I really need to play some sounds in my DOS-programs. I really would appreciate, if someone could help me :) Stein@c++ |
|
From: <ste...@ge...> - 2001-06-16 21:41:50
|
There's gotta be someone who can help me with this! I really need to play some sounds in my DOS-programs. I really would appreciate, if someone could help me :) Stein@c++ |
|
From: Ewald H. <sl...@ya...> - 2001-06-16 16:32:22
|
Howdy... Does anyone know whether Dev-C++ supports MAPI or not ? I'm just curious. Regards Ewald _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: Derek B. <der...@ho...> - 2001-06-16 16:23:36
|
that would probobly involve some registry checking ----- Original Message -----=20 From: tim@netfactoriel=20 To: devcpp=20 Sent: Friday, June 15, 2001 9:38 AM Subject: [Dev-C++] Detecting Software version No's Hi there, I'm trying to write an App that checks to see if Acrobat Reader V4 or = above is installed and if not lanches the installation program. Any help on the subject would be very helpfull. Thanks in advanced tim |
|
From: <ste...@ge...> - 2001-06-15 18:33:49
|
Hey all! I really would like to be able to play some kewl sound effects, for my = new DOS-game. Is there anyone who can help me? Thanks! - Stein (void); |
|
From: <ti...@ne...> - 2001-06-15 14:47:23
|
Hi there, I'm trying to write an App that checks to see if Acrobat Reader V4 or = above is installed and if not lanches the installation program. Any help on the subject would be very helpfull. Thanks in advanced tim |
|
From: Steve D. P. <ste...@ho...> - 2001-06-14 13:57:40
|
> What's wrong with a getch() at the end of the program?
Nothing. You can achieve the "Press Any Key to Continue..." effect in
several ways, the point is simply that this is the easiest strategy for
writing a console app whose window doesn't close before you can see its
output.
|
|
From: Peter W. (EMW) <Pet...@em...> - 2001-06-14 08:06:04
|
Hi all, I=B4m trying to learn how to address and talk to HPIB instruments with = the attached exampleprogram but I get these errors: c:\dev-c++\bin\untitled1.o(.text+0x24):untitled1.c: undefined reference = to `iopen' c:\dev-c++\bin\untitled1.o(.text+0x3d):untitled1.c: undefined reference = to `itimeout' c:\dev-c++\bin\untitled1.o(.text+0x51):untitled1.c: undefined reference = to `iprintf' c:\dev-c++\bin\untitled1.o(.text+0x60):untitled1.c: undefined reference = to `iclose' c:\dev-c++\bin\untitled1.o(.text+0x68):untitled1.c: undefined reference = to `_siclcleanup' what am I doing wrong. Sorry for being a newbie! |
|
From: Thomas J. <th...@zi...> - 2001-06-14 06:24:17
|
At 06:02 14-6-2001 +0530, you wrote:
>se =
>give me a=20
>weblink where I can find it.</FONT></DIV>
><BLOCKQUOTE dir=3Dltr=20
>style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
>BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
>
>
>
>
>
>
>--__--__--
>
>Message: 3
>From: "John Dempsey" <jr...@gp...>
>> Dear Sir,
>> I'm a novice. " , as soon
>> as I run the program, the screen switches into Dos and back to
>> Windowa at lightning speed, I can't even see what the computer did.
>> How can I tell the program to go to DOS and stay there? Or better
>> yet, how can I execute these simple programs from the Dev-C screen
>> without even going to DOS?
>> Yours truly
>> John Dempsey
>>
>
>
>Hai,
>You can use the following lines in your cods. It stops!
>
>__#include <iostream.h>
>#include <stdlib.h>
>
>int main()
>{
>
> system("PAUSE");
> return 0;
>}
>
>ashok
What's wrong with a getch() at the end of the program?
#include <conio.h>
main()
{
... //the code
getch();
}
Thomas
|
|
From: Steve D. P. <ste...@ho...> - 2001-06-14 03:25:52
|
> I'm a novice. I just got the Dev-C++. Why is it that when I select
> Console Application for simple project, i.e. "Hello World" , as soon
> as I run the program, the screen switches into Dos and back to
> Windowa at lightning speed, I can't even see what the computer did.
> How can I tell the program to go to DOS and stay there? Or better
> yet, how can I execute these simple programs from the Dev-C screen
> without even going to DOS?
The "Hello World" template creates a console-based app... which executes
in a console window. The default characteristics of console windows are
adjusted in slightly different ways depending on the particular version of
Windows you're talking about... but they all have the option of either
closing on exit or not. "Close on exit" means that a console window created
to run a console app will automatically close once that app exits...
otherwise you will get a "Press any key to continue..." prompt before the
window closes.
The reason that your console windows flashes by is that your system is
configured for "close on exit". Since there are so many different ways to
control this behavior depending on your Windows version (and I don't know
all of them), I'm not even going to suggest that you try to fix the
"problem" by exploring that route. The easier solution would be to use this
line in your program right before the program exits:
system("PAUSE");
This will invoke that "Press any key to continue..." prompt I mentioned
earlier, and keep your console session from flashing by so quickly.
|