Click here to Skip to main content
16,012,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hooking CoCreateInstance / CoGetClassObject Pin
Joel Lucsy29-Mar-05 13:03
Joel Lucsy29-Mar-05 13:03 
QuestionHow to compare two images using cximage Pin
Madhurya29-Mar-05 4:54
Madhurya29-Mar-05 4:54 
AnswerRe: How to compare two images using cximage Pin
Ted Ferenc29-Mar-05 5:23
Ted Ferenc29-Mar-05 5:23 
AnswerRe: How to compare two images using cximage Pin
Chris Losinger29-Mar-05 10:01
professionalChris Losinger29-Mar-05 10:01 
AnswerRe: How to compare two images using cximage Pin
John R. Shaw30-Mar-05 9:09
John R. Shaw30-Mar-05 9:09 
Generalproblem with MFC DLL Pin
eli1502197929-Mar-05 3:47
eli1502197929-Mar-05 3:47 
GeneralRe: problem with MFC DLL Pin
Blake Miller29-Mar-05 5:27
Blake Miller29-Mar-05 5:27 
GeneralRe: problem with MFC DLL Pin
eli150219791-Apr-05 0:05
eli150219791-Apr-05 0:05 
Hi,
First - thanks for your prompt reply.
well,i'v tried your suggestion,but it's still give me run time error(something about convntion - as you said).

Here is what i did:
Instead of :
TCPDLL_API int FLRInitializeIP(IPStruct *Server,int num_of_radars);


I've wrote :
TCPDLL_API int WINAPI FLRInitializeIP(IPStruct *Server,int num_of_radars);


and instead of :
TCPDLL_API int FLRInitializeIP(IPStruct *Server ,int num_of_radars)
{
   struct hostent *Host;
   SIZE_T t=100;
   char *host_name = new char[100];
   gethostname(host_name,t);	 
   Host = gethostbyname(host_name);
   Server->HostIP = inet_ntoa(*((struct in_addr*)Host->h_addr));
   delete []host_name;
   //Server->ClientsArray = new FLR_COMMUNICATION_DEVICE[num_of_radars];
   //for(int i = 0 ; i < num_of_radars ; i++)
   //{
   //	Server->ClientsArray[i].socket = INVALID_SOCKET;
   //	Server->ClientsArray[i].IP_Address.Empty();
   //}
   Server->Num_Of_Connected_Clients = 0; 
   Server->ListeningSocket = INVALID_SOCKET;
   Server->Num_Of_Radars = num_of_radars;
   if(CreateTCPServerSocket(Server) != LISTEN_SUCCESS)
      return 0;//LISTEN_FAILED;
   return 1;//LISTEN_SUCCESS;
}


I've wrote :
TCPDLL_API int WINAPI FLRInitializeIP(IPStruct *Server ,int num_of_radars)
{
   struct hostent *Host;
   SIZE_T t=100;
   char *host_name = new char[100];
   gethostname(host_name,t);	 
   Host = gethostbyname(host_name);
   Server->HostIP = inet_ntoa(*((struct in_addr*)Host->h_addr));
   delete []host_name;
   //Server->ClientsArray = new FLR_COMMUNICATION_DEVICE[num_of_radars];
   //for(int i = 0 ; i < num_of_radars ; i++)
   //{
   //	Server->ClientsArray[i].socket = INVALID_SOCKET;
   //	Server->ClientsArray[i].IP_Address.Empty();
   //}
   Server->Num_Of_Connected_Clients = 0; 
   Server->ListeningSocket = INVALID_SOCKET;
   Server->Num_Of_Radars = num_of_radars;
   if(CreateTCPServerSocket(Server) != LISTEN_SUCCESS)
      return 0;//LISTEN_FAILED;
   return 1;//LISTEN_SUCCESS;
}


Now,when I'm debugging my code - the function works well and the run time
error accurs after the :
return 0;//LISTEN_FAILED;

or
return 1;//LISTEN_SUCCESS;


So,where is the problem???Confused | :confused: Confused | :confused: Confused | :confused:

Again - thanks for your help.
With best regards,
Eli
GeneralRe: problem with MFC DLL Pin
Blake Miller1-Apr-05 4:09
Blake Miller1-Apr-05 4:09 
GeneralHELP!!! Pin
shulflem29-Mar-05 3:46
shulflem29-Mar-05 3:46 
GeneralRe: HELP!!! Pin
Alexander M.,29-Mar-05 5:37
Alexander M.,29-Mar-05 5:37 
GeneralRe: HELP!!! Pin
ThatsAlok29-Mar-05 17:59
ThatsAlok29-Mar-05 17:59 
GeneralRe: HELP!!! Pin
ThatsAlok29-Mar-05 18:04
ThatsAlok29-Mar-05 18:04 
GeneralHELP!!! Pin
Anonymous29-Mar-05 3:45
Anonymous29-Mar-05 3:45 
GeneralCMSHFlexGrid How Move .... Pin
ivax29-Mar-05 2:28
ivax29-Mar-05 2:28 
GeneralUser Password Pin
Anonymous29-Mar-05 1:44
Anonymous29-Mar-05 1:44 
GeneralRe: User Password Pin
bosfan29-Mar-05 1:49
bosfan29-Mar-05 1:49 
GeneralRe: User Password Pin
Blake Miller29-Mar-05 5:30
Blake Miller29-Mar-05 5:30 
GeneralRe: User Password Pin
Michael Dunn29-Mar-05 5:40
sitebuilderMichael Dunn29-Mar-05 5:40 
GeneralRe: User Password Pin
bosfan29-Mar-05 20:06
bosfan29-Mar-05 20:06 
GeneralRe: User Password Pin
deldeep29-Mar-05 20:41
deldeep29-Mar-05 20:41 
GeneralRe: User Password Pin
bosfan30-Mar-05 1:05
bosfan30-Mar-05 1:05 
GeneralCompatabilty between windows 95 &amp;windows 98 device drivers Pin
Neha.marwaha29-Mar-05 1:18
Neha.marwaha29-Mar-05 1:18 
GeneralRe: Compatabilty between windows 95 &amp;windows 98 device drivers Pin
Alexander M.,29-Mar-05 2:55
Alexander M.,29-Mar-05 2:55 
GeneralRe: Compatabilty between windows 95 &amp;windows 98 device drivers Pin
Neha.marwaha29-Mar-05 16:50
Neha.marwaha29-Mar-05 16:50 

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.