Click here to Skip to main content
15,922,574 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BitBlt() Pin
Christian Graus16-Jan-02 13:25
protectorChristian Graus16-Jan-02 13:25 
Generalbind() error Pin
Rickard Andersson2016-Jan-02 11:11
Rickard Andersson2016-Jan-02 11:11 
GeneralRe: bind() error Pin
Joaquín M López Muñoz16-Jan-02 11:37
Joaquín M López Muñoz16-Jan-02 11:37 
GeneralRe: bind() error Pin
Rickard Andersson2016-Jan-02 21:11
Rickard Andersson2016-Jan-02 21:11 
GeneralRe: bind() error Pin
Joaquín M López Muñoz16-Jan-02 21:29
Joaquín M López Muñoz16-Jan-02 21:29 
GeneralRe: bind() error Pin
Rickard Andersson2016-Jan-02 22:57
Rickard Andersson2016-Jan-02 22:57 
GeneralRe: bind() error Pin
Joaquín M López Muñoz17-Jan-02 2:04
Joaquín M López Muñoz17-Jan-02 2:04 
QuestionWhy does this crash? Pin
User 665816-Jan-02 10:26
User 665816-Jan-02 10:26 
Hi
currently I'm playing around with Mircosoft's Detours-Library, which makes it possible to detour api calls to my dll. Everything works quite fine...
but when I try to log the buffer sent through the winsock "send()" function the app calling the "send()" command crashes.

Here's a part of the code from my DLL:

int __stdcall MINE_sendto(SOCKET s, const char FAR * buf, int len, int flags, const struct sockaddr FAR * to, int tolen )
{
	if(file != NULL)
	{
		char buffer[128];

		sprintf(buffer,"send() called:\r\n%s\r\n",buf);
		fwrite(buffer,sizeof(char),strlen(buffer),file);
	}

	return REAL_sendto(s, buf, len, flags, to, tolen );
}


If I comment out the line "sprintf(buffer..." everything works fine, i.e. the problem must be there, but where is the problem actually?

regards
Gregor

modified 12-Sep-18 21:01pm.

AnswerRe: Why does this crash? Pin
Michael Dunn16-Jan-02 10:39
sitebuilderMichael Dunn16-Jan-02 10:39 
GeneralRe: Why does this crash? Pin
User 665816-Jan-02 10:53
User 665816-Jan-02 10:53 
GeneralRe: Why does this crash? Pin
Michael Dunn16-Jan-02 11:03
sitebuilderMichael Dunn16-Jan-02 11:03 
GeneralRe: Why does this crash? Pin
User 665816-Jan-02 11:08
User 665816-Jan-02 11:08 
GeneralRe: Why does this crash? Pin
Nish Nishant16-Jan-02 13:15
sitebuilderNish Nishant16-Jan-02 13:15 
GeneralRe: Why does this crash? Pin
Mustafa Demirhan16-Jan-02 13:30
Mustafa Demirhan16-Jan-02 13:30 
GeneralRe: Why does this crash? Pin
User 665817-Jan-02 7:58
User 665817-Jan-02 7:58 
GeneralRe: Why does this crash? Pin
Mustafa Demirhan17-Jan-02 13:44
Mustafa Demirhan17-Jan-02 13:44 
GeneralRe: Why does this crash? Pin
Alvaro Mendez17-Jan-02 9:33
Alvaro Mendez17-Jan-02 9:33 
GeneralRe: Why does this crash? Pin
Mustafa Demirhan17-Jan-02 10:16
Mustafa Demirhan17-Jan-02 10:16 
GeneralMicrosoft Word Documents Pin
Kevnar16-Jan-02 9:59
Kevnar16-Jan-02 9:59 
GeneralRe: Microsoft Word Documents Pin
Anders Molin16-Jan-02 11:15
professionalAnders Molin16-Jan-02 11:15 
QuestionIs there a way to only allow file previewing done in explorer to preview only certain file extensions? Pin
Bart-Man16-Jan-02 9:48
Bart-Man16-Jan-02 9:48 
AnswerRe: Is there a way to only allow file previewing done in explorer to preview only certain file extensions? Pin
Chris Losinger16-Jan-02 10:24
professionalChris Losinger16-Jan-02 10:24 
GeneralRe: Is there a way to only allow file previewing done in explorer to preview only certain file extensions? Pin
Bart-Man16-Jan-02 11:07
Bart-Man16-Jan-02 11:07 
GeneralHelp :) Pin
RobJones16-Jan-02 9:28
RobJones16-Jan-02 9:28 
GeneralRe: Help :) Pin
Joaquín M López Muñoz16-Jan-02 9:41
Joaquín M López Muñoz16-Jan-02 9:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.