Click here to Skip to main content
15,917,731 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to make a circle push button? Pin
LaHaHa18-Oct-05 5:55
LaHaHa18-Oct-05 5:55 
AnswerRe: How to make a circle push button? Pin
ThatsAlok18-Oct-05 6:13
ThatsAlok18-Oct-05 6:13 
Questionthatsalok help me ( sending file through a socket) Pin
REU18-Oct-05 5:37
REU18-Oct-05 5:37 
AnswerRe: thatsalok help me ( sending file through a socket) Pin
ThatsAlok18-Oct-05 6:11
ThatsAlok18-Oct-05 6:11 
Questionmixing unmanaged and managed code to get a .Net dll Pin
DeepToot18-Oct-05 5:05
DeepToot18-Oct-05 5:05 
AnswerRe: mixing unmanaged and managed code to get a .Net dll Pin
DeepToot18-Oct-05 9:20
DeepToot18-Oct-05 9:20 
QuestionHow can I get help topic, content in .chm file? Pin
ducgerman18-Oct-05 4:42
ducgerman18-Oct-05 4:42 
Questionfunction send() (Winsocks) help !! Pin
REU18-Oct-05 4:37
REU18-Oct-05 4:37 
SHALOM
everybody
I have a big problem,
Im using sockets to communicate 2 aplicattions,
Im using the functions send() and recv()
and everythings is going well ,,

but now I need to send a file , is a .Wav file

so the first thing I need to know is the size of the file to transfer first the size of the file , then in the other side of the connection I will know how size to receive.

well the size I get using this

FILE* f;
f=fopen("file1.Wav","rb");


int size;
fseek(f,0,SEEK_END); //move the pointer to the final of the file
size=ftell(f); //to know where is the pointer
rewind(f); //to put the pointer in the begining of the file

so I have in size the size of the file.
but this is an int var

Im trying to send the data like this


send(socket, &size, sizeof(size), 0);

so when I try to send it by the sockets it say
error C2664 cannot convert parameter 2 from int * to const char *

the function send() takes 4 param

http://msdn.microsoft.com/library/en-us/winsock/winsock/send_2.asp[^]


so,, can somebody tell me how to send the size of the file ???

Thanx


GOD BLESS YA

REU
AnswerRe: function send() (Winsocks) help !! Pin
ThatsAlok18-Oct-05 4:56
ThatsAlok18-Oct-05 4:56 
GeneralRe: function send() (Winsocks) help !! Pin
begray18-Oct-05 9:23
begray18-Oct-05 9:23 
GeneralRe: function send() (Winsocks) help !! Pin
ThatsAlok18-Oct-05 19:47
ThatsAlok18-Oct-05 19:47 
QuestionHow can I make a modeless topmost for the desktop ? Pin
yarp18-Oct-05 4:03
yarp18-Oct-05 4:03 
AnswerRe: How can I make a modeless topmost for the desktop ? Pin
Iain Clarke, Warrior Programmer18-Oct-05 4:25
Iain Clarke, Warrior Programmer18-Oct-05 4:25 
GeneralRe: How can I make a modeless topmost for the desktop ? Pin
yarp18-Oct-05 5:47
yarp18-Oct-05 5:47 
AnswerRe: How can I make a modeless topmost for the desktop ? Pin
Arman S.18-Oct-05 10:35
Arman S.18-Oct-05 10:35 
AnswerRe: How can I make a modeless topmost for the desktop ? Pin
S Douglas18-Oct-05 22:50
professionalS Douglas18-Oct-05 22:50 
AnswerRe: How can I make a modeless topmost for the desktop ? Pin
yarp20-Oct-05 6:19
yarp20-Oct-05 6:19 
QuestionAccess Violation Error Pin
nripun18-Oct-05 3:50
nripun18-Oct-05 3:50 
AnswerRe: Access Violation Error Pin
David Crow18-Oct-05 3:57
David Crow18-Oct-05 3:57 
GeneralRe: Access Violation Error Pin
Chris Losinger18-Oct-05 4:03
professionalChris Losinger18-Oct-05 4:03 
GeneralRe: Access Violation Error Pin
David Crow18-Oct-05 4:43
David Crow18-Oct-05 4:43 
GeneralRe: Access Violation Error Pin
Chris Losinger18-Oct-05 4:50
professionalChris Losinger18-Oct-05 4:50 
GeneralRe: Access Violation Error Pin
nripun18-Oct-05 5:21
nripun18-Oct-05 5:21 
GeneralRe: Access Violation Error Pin
Rage18-Oct-05 5:43
professionalRage18-Oct-05 5:43 
GeneralRe: Access Violation Error Pin
nripun19-Oct-05 0:45
nripun19-Oct-05 0:45 

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.