Click here to Skip to main content
15,900,433 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to list all installed programs of my windows? Pin
Adam Roderick J12-Aug-09 18:02
Adam Roderick J12-Aug-09 18:02 
GeneralRe: How to list all installed programs of my windows? Pin
kcynic13-Aug-09 4:46
kcynic13-Aug-09 4:46 
AnswerRe: How to list all installed programs of my windows? Pin
David Crow13-Aug-09 3:01
David Crow13-Aug-09 3:01 
GeneralRe: How to list all installed programs of my windows? Pin
kcynic13-Aug-09 4:44
kcynic13-Aug-09 4:44 
AnswerRe: How to list all installed programs of my windows? Pin
kilt17-Aug-09 3:39
kilt17-Aug-09 3:39 
GeneralRe: How to list all installed programs of my windows? Pin
kcynic18-Aug-09 15:58
kcynic18-Aug-09 15:58 
GeneralRe: How to list all installed programs of my windows? Pin
David Crow14-Sep-09 4:11
David Crow14-Sep-09 4:11 
GeneralUnix to WIndows Message Pin
Andy20212-Aug-09 9:26
Andy20212-Aug-09 9:26 
My Windows MFC Application will receive a structure from a Unix machine (Big Endian) over UDP.

The structure has the following data types:-

struct RXData {
      double    timeStamp; 
      double    item1;    
      long    item2;       
      double    item3;      
      int	 flag1;    
      bool	 state;  
};


What do I need to do on the Windows platform to get the data in the correct format; i.e. do I use procedures like theses below - I did try but still not getting the correct answer.

float swap(float d) 
{ 
    float a; 
    unsigned char *dst = (unsigned char *)&a; 
    insigned char *src = (unsigned char *)&d; 
    dst[0] = src[3];
    dst[1] = src[2];
    dst[2] = src[1];
    dst[3] = src[0]; 
    return a; 
} 

short convert_short(short in)
{
    short out;
    char *p_in = (char *) ∈
    char *p_out = (char *) &out;
    p_out[0] = p_in[1];
    p_out[1] = p_in[0];  
    return out;
}


The floats give incorrect values.

Any suggestions for this simple scheme please.Confused | :confused:

Regards,

Andy.
GeneralRe: Unix to WIndows Message Pin
CPallini12-Aug-09 9:44
mveCPallini12-Aug-09 9:44 
GeneralRe: Unix to WIndows Message Pin
Luc Pattyn12-Aug-09 9:44
sitebuilderLuc Pattyn12-Aug-09 9:44 
GeneralRe: Unix to WIndows Message Pin
Rajesh R Subramanian12-Aug-09 19:54
professionalRajesh R Subramanian12-Aug-09 19:54 
GeneralRe: Unix to WIndows Message Pin
CPallini12-Aug-09 21:00
mveCPallini12-Aug-09 21:00 
Questionserial port programming in windows using VC++ 2008 Pin
Member 71614312-Aug-09 7:52
Member 71614312-Aug-09 7:52 
AnswerRe: serial port programming in windows using VC++ 2008 Pin
CPallini12-Aug-09 9:38
mveCPallini12-Aug-09 9:38 
AnswerRe: serial port programming in windows using VC++ 2008 Pin
Randor 12-Aug-09 9:45
professional Randor 12-Aug-09 9:45 
QuestionIs it possible to send user data in CSocket::Connect Pin
includeh1012-Aug-09 7:39
includeh1012-Aug-09 7:39 
AnswerRe: Is it possible to send user data in CSocket::Connect Pin
Stuart Dootson12-Aug-09 10:41
professionalStuart Dootson12-Aug-09 10:41 
AnswerRe: Is it possible to send user data in CSocket::Connect Pin
Bacon Ultimate Cheeseburger12-Aug-09 12:10
Bacon Ultimate Cheeseburger12-Aug-09 12:10 
GeneralRe: Is it possible to send user data in CSocket::Connect Pin
zhu_lin12-Aug-09 16:47
zhu_lin12-Aug-09 16:47 
GeneralRe: Is it possible to send user data in CSocket::Connect Pin
Bacon Ultimate Cheeseburger12-Aug-09 17:32
Bacon Ultimate Cheeseburger12-Aug-09 17:32 
AnswerRe: Is it possible to send user data in CSocket::Connect Pin
zhu_lin12-Aug-09 16:48
zhu_lin12-Aug-09 16:48 
AnswerRe: Is it possible to send user data in CSocket::Connect Pin
Rajesh R Subramanian12-Aug-09 19:45
professionalRajesh R Subramanian12-Aug-09 19:45 
AnswerRe: Is it possible to send user data in CSocket::Connect Pin
Moak13-Aug-09 13:55
Moak13-Aug-09 13:55 
QuestionCSocket: using thread or not? Pin
includeh1012-Aug-09 7:15
includeh1012-Aug-09 7:15 
AnswerRe: CSocket: using thread or not? Pin
wmallory12-Aug-09 7:41
wmallory12-Aug-09 7: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.