Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalmapping a va_list (...) in another function call Pin
2-Sep-01 22:37
suss2-Sep-01 22:37 
GeneralRe: mapping a va_list (...) in another function call Pin
Rashid Thadha2-Sep-01 23:59
Rashid Thadha2-Sep-01 23:59 
GeneralRe: mapping a va_list (...) in another function call Pin
3-Sep-01 22:09
suss3-Sep-01 22:09 
GeneralRe: mapping a va_list (...) in another function call Pin
The_Server3-Sep-01 13:02
The_Server3-Sep-01 13:02 
GeneralRe: mapping a va_list (...) in another function call Pin
Tim Smith3-Sep-01 13:36
Tim Smith3-Sep-01 13:36 
GeneralRe: mapping a va_list (...) in another function call Pin
The_Server4-Sep-01 13:13
The_Server4-Sep-01 13:13 
GeneralRe: mapping a va_list (...) in another function call Pin
Tomasz Sowinski3-Sep-01 13:48
Tomasz Sowinski3-Sep-01 13:48 
GeneralRe: mapping a va_list (...) in another function call Pin
The_Server4-Sep-01 12:50
The_Server4-Sep-01 12:50 
well to got the 64 bits value (e.g. __int64 or double) we do it like this:
(*** lets say we're working on a 32bit OS ***)
in the .h file:
#define GetParam(arg,num) (((int *)(&arg))[num])
func1(const char *lll, ...);


The arguments come in 32 bits pieces.
There for the 64bits variable will come in 2 pieces (64/32=2). Smile | :)
and we will get the value like this
func1(const char *lll, ...)
{
    __int64 l_nNumber;  // a 64 bits unit to store the data
    int pos=0; // the current position of the args: 0=lll, 1=next val,2= 3rd,...
 
    ((__int32 *)&l_nNumber)[0]= GetParam(lll, ++pos); // copy the 1st 32bits
    ((__int32 *)&l_nNumber)[1]= GetParam(lll, ++pos); // copy the 2st 32bits
 
    //BTW: works same way on double
}


BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject"
GeneralRe: mapping a va_list (...) in another function call Pin
Tomasz Sowinski5-Sep-01 1:26
Tomasz Sowinski5-Sep-01 1:26 
GeneralRe: mapping a va_list (...) in another function call Pin
The_Server8-Sep-01 14:07
The_Server8-Sep-01 14:07 
GeneralRe: mapping a va_list (...) in another function call Pin
Tomasz Sowinski9-Sep-01 23:39
Tomasz Sowinski9-Sep-01 23:39 
GeneralRe: mapping a va_list (...) in another function call Pin
3-Sep-01 21:48
suss3-Sep-01 21:48 
GeneralAbout window class Pin
Maer7272-Sep-01 21:13
Maer7272-Sep-01 21:13 
GeneralRe: About window class Pin
Christian Graus3-Sep-01 0:20
protectorChristian Graus3-Sep-01 0:20 
GeneralRe: About window class Pin
Steen Krogsgaard3-Sep-01 23:19
Steen Krogsgaard3-Sep-01 23:19 
Generalabout ATOM Pin
Maer7272-Sep-01 20:54
Maer7272-Sep-01 20:54 
GeneralRe: about ATOM Pin
Tomasz Sowinski3-Sep-01 0:17
Tomasz Sowinski3-Sep-01 0:17 
GeneralRe: about ATOM Pin
Maer7273-Sep-01 5:21
Maer7273-Sep-01 5:21 
QuestionHICON to HBITMAP? Pin
Aza2-Sep-01 20:30
Aza2-Sep-01 20:30 
AnswerRe: HICON to HBITMAP? Pin
Michael Dunn2-Sep-01 21:20
sitebuilderMichael Dunn2-Sep-01 21:20 
QuestionCreateDialogIndirect ToolWindow problem ? Pin
Christian Graus2-Sep-01 19:12
protectorChristian Graus2-Sep-01 19:12 
AnswerRe: CreateDialogIndirect ToolWindow problem ? Pin
Michael Dunn2-Sep-01 19:48
sitebuilderMichael Dunn2-Sep-01 19:48 
GeneralRe: CreateDialogIndirect ToolWindow problem ? Pin
Christian Graus2-Sep-01 19:53
protectorChristian Graus2-Sep-01 19:53 
GeneralText Area In Win32 Pin
2-Sep-01 18:36
suss2-Sep-01 18:36 
GeneralRe: Text Area In Win32 Pin
Christian Graus2-Sep-01 18:43
protectorChristian Graus2-Sep-01 18:43 

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.