Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Graphic Question Pin
Christian Graus20-Mar-01 11:49
protectorChristian Graus20-Mar-01 11:49 
GeneralGetting rid of, or modifying the HScrollBar in my TreeView Pin
20-Mar-01 3:58
suss20-Mar-01 3:58 
GeneralTool for Translating Software / Resource Editor Pin
20-Mar-01 3:44
suss20-Mar-01 3:44 
GeneralRe: Tool for Translating Software / Resource Editor Pin
20-Mar-01 5:17
suss20-Mar-01 5:17 
GeneralRe: Tool for Translating Software / Resource Editor Pin
Masaaki Onishi20-Mar-01 6:52
Masaaki Onishi20-Mar-01 6:52 
GeneralHelp Me!! Pin
20-Mar-01 2:56
suss20-Mar-01 2:56 
GeneralRe: Help Me!! Pin
l a u r e n21-Mar-01 1:19
l a u r e n21-Mar-01 1:19 
General(void *) conversion to double Pin
Joan M20-Mar-01 2:30
professionalJoan M20-Mar-01 2:30 
Hello, first of all excuse my english, as in VC++ I'm just a begginer.

I have a DLL that allows me to interact with a PLC. I need to get some values that are stored in the double format.

the f(x) that allows me to obtain the values from the PLC use a pointer to a void type.

here's a piece of code:

long CAccedirTWinCAT::GetDadesxNom(CString csNom, void *&pParam, int iPort /*=AMSPORT_R0_PLC_RTS1*/)
{
EnterCriticalSection(&m_CritSec);

long lCodiError = 1;
ULONG VarHandle = NULL;
ULONG ulData = NULL;
int iLength = csNom.GetLength();

m_pAddr->port = iPort;

// this is the dll exported function.
lCodiError = AdsSyncReadReq(this->m_pAddr,ADSIGRP_SYM_VALBYHND,m_VarHandle,sizeof(pParam),&ulData);
pParam = (void *)ulData;

LeaveCriticalSection(&m_CritSec);

return lCodiError;
}


and here how I call the f(x).

void *vParam;
m_Accedir.GetDadesxNom(".g_bManual",vParam);
BOOL bEstatManualACT = (BOOL)vParam;


How should I convert the (void *) to a double?
GeneralRe: (void *) conversion to double Pin
markkuk20-Mar-01 21:41
markkuk20-Mar-01 21:41 
GeneralDebugging Problem with CHAR Pin
.::RockNix::.20-Mar-01 1:29
.::RockNix::.20-Mar-01 1:29 
GeneralRe: Debugging Problem with CHAR Pin
20-Mar-01 3:44
suss20-Mar-01 3:44 
GeneralFirst-chance exception in myapp.exe (GDI32.DLL): 0xC0000005: Access Violation. Pin
jerry0davis20-Mar-01 0:38
jerry0davis20-Mar-01 0:38 
GeneralRe: First-chance exception in myapp.exe (GDI32.DLL): 0xC0000005: Access Violation. Pin
Tim Deveaux20-Mar-01 13:03
Tim Deveaux20-Mar-01 13:03 
QuestionHow to maintain different title bars' caption ? Pin
leonwoo20-Mar-01 0:10
leonwoo20-Mar-01 0:10 
AnswerRe: How to maintain different title bars' caption ? Pin
Michael Dunn20-Mar-01 6:20
sitebuilderMichael Dunn20-Mar-01 6:20 
GeneralRe: How to maintain different title bars' caption ? Pin
21-Mar-01 0:58
suss21-Mar-01 0:58 
AnswerRe: How to maintain different title bars' caption ? Pin
l a u r e n21-Mar-01 1:23
l a u r e n21-Mar-01 1:23 
GeneralADO Streams Pin
ernst.maurer19-Mar-01 23:13
ernst.maurer19-Mar-01 23:13 
GeneralStorage, OleDocument ... Pin
19-Mar-01 22:24
suss19-Mar-01 22:24 
Generalsome thing is strang in double type Pin
Ahmad19-Mar-01 21:44
Ahmad19-Mar-01 21:44 
GeneralRe: some thing is strang in double type Pin
markkuk19-Mar-01 22:10
markkuk19-Mar-01 22:10 
GeneralRe: some thing is strang in double type Pin
Ahmad20-Mar-01 21:00
Ahmad20-Mar-01 21:00 
Generalpointer of pointer(char** ch) Pin
Ahmad19-Mar-01 21:39
Ahmad19-Mar-01 21:39 
GeneralRe: pointer of pointer(char** ch) Pin
Datacrime20-Mar-01 1:24
Datacrime20-Mar-01 1:24 
GeneralRe: pointer of pointer(char** ch) Pin
Ahmad20-Mar-01 21:09
Ahmad20-Mar-01 21:09 

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.