|
Hi Andrew,
Interesting discovery. Are you able to reproduce this bug in a small VS2008 wizard-generated application?
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
I am trying to compile this program with Visual Studio C++ 2008 as the compiler in Windows.
It is the program:
#include <stdio.h>
int main()
{
FILE *fichero;
char letra;
fichero = fopen("origen.txt","r");
if (fichero==NULL)
{
printf( "No se puede abrir el fichero.\n" );
exit( 1 );
}
printf( "Contenido del fichero:\n" );
letra=getc(fichero);
while (feof(fichero)==0)
{
printf( "%c",letra );
letra=getc(fichero);
}
if (fclose(fichero)!=0)
printf( "Problemas al cerrar el fichero\n" );
}
It is the error message:
>1.......warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>c:\archivos de programa\microsoft visual studio 9.0\vc\include\stdio.h(237) : vea la declaración de 'fopen'
>...error C3861: 'exit': no se encontró el identificador
--------
Could anyone help me?
|
|
|
|
|
Please next time before posting read the posting guidelines here[^] (and more specifically, the point 7).
For your question, did you include stdlib.h as stated in the documentation[^] for the exit function ?
|
|
|
|
|
|
First: Please use "pre" tag to format your code so it will be readable.
About the error: Because of poor formatting (not using "pre" tag) i can't see which header you've included but i suppose that it is <stdio.h> . The error message is about the exit function.
To use this function you have to include <stdlib.h> .
Regards,
Nuri Ismail
|
|
|
|
|
|
programmer202 wrote: Could anyone help me?
The warning message is self explanatory. Use fopen_s() instead. If you insist on using fopen() , then define _CRT_SECURE_NO_WARNINGS .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Objective: Modify a dll(binary) to either
1. Call another exe
2. Call another dll (function)
3. Modify the Dll binary by inserting code(Asm/Binary) and generate a shell(cmd.exe)
I know it sounds stupid but I hope you guys got the idea. Please feel free if you need more clarification...I have been trying to do this but no info is available. Now Im wondering is it even possible?
Dll injection/hooking/tampering...any(all) concept is ok, just want to know whats the roadblock to achieve something like this.
Eg:
I have a 3rd part dll called Game.dll. now I want to modify it somehow/anyhow and make it call calc.exe....alrite you guys can laugh !!!!
|
|
|
|
|
Well it's certainly possible, but you will need to know the format of not just the dll but the specific obj portion that you want to modify. There are various technical websites around which may offer tools to help you do this but it is not a trivial task.
|
|
|
|
|
I have an app written in VS 2005, which consists of a single exe file, but when I move it to another machine and try to start it it gives me the error:
---------------------------
C:\Documents and Settings\R\Desktop\MyApp\MyApp\MyApp.exe
---------------------------
C:\Documents and Settings\R\Desktop\MyApp\MyApp\MyApp.exe
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
---------------------------
OK
---------------------------
I haven't created this app, just compiled it, and I needed to link it against wxWidgets (the build mode was "Static Unicode Release Multilib").
On the machine where I compiled it it runs fine. Anyone know what is the problem? When a dll is missing the error message usually tells which one, but I've never seen this error message before.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
|
Randor wrote: Everytime I come to codeproject.com I experience Deja-Vu[^]
From that Wikipedia page:
This article contains weasel words, vague phrasing that often accompanies biased or unverifiable information.
I could swear I've seen this before...
|
|
|
|
|
Thanks for the answer, I also think that it has to do with VS2005 runtime because the app started on a colleague's computer and he had VS2008.
I tried installing the redistributable package on the virtual machine but it didn't work, and when I tried building with /MT instead of /MD I got this warning:
1>cl : Command line warning D9025 : overriding '/MT' with '/MD'
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: Command line warning D9025 : overriding '/MT' with '/MD'
I believe this means you have set /MD on one or more of your .CPP files. Right click all of the .CPP files in your project and change them all to /MT runtime and the D9025 warning should be gone.
Best Wishes,
-David Delaune
|
|
|
|
|
I found where the problems was, I had compiled wxWidgets under VS2008, now I compiled both wxWidgets and the app under VC6 and it worked.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
So was compiling the app in VS2005 not one of your goals?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Not specifically, the app had 3 different workspaces - for VC6, VS2003, and VS2005, while wxWidgets had workspaces for VC6, VS2003, VS2005 and VS2008. I had just picked the newest versions supported, because the newest is supposed to be the best, not for any particular reason.
The problem was that while the app itself only needed VS2005 runtime, but wxWidgets which had been statically linked introduced dependencies on VS2008 too. That was the problem - the VS 2008 dependency that came with wxWidgets. The computer when it showed up had XP SP2 without any VS installed. When I realized that I figured it's best to compile wxWidgets and the app with the same version of VS and I decided to use VC6 because it gives the least dependencies.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
I want to create a table in a database which should contain columns that are just like in the other known database, I know how to retrieve columns information by CODBCFieldInfo structure but how could I convert it to sql string to use in my create table string.
|
|
|
|
|
I want List of Ports associated with a Process using Window Management Instrumentation ? can it be done using WMI? if yes how ?
Thanks
|
|
|
|
|
Hi All,
i am posting one url through http request with setting this
"x-microsoftajax;Delta=true" header but i am getting "400" http error code, can someone please give me suggestions on it.....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
how can i change the colour of ny dialog box and the looks of dialog box in MFC like what we can do with forms in C#
thanks.
|
|
|
|
|
You need to fill certain areas using CPen object.
|
|
|
|
|
|
Hello Friends
I created one .exe that is deleting some files from one folder.
If I do Start Debugging then It is deleting all the files But If i run that exe then it is giving Window error.
What could b the reason?
And I m using remove to delete files.
|
|
|
|
|