|
CRecordset is an MFC class which is not IDispatch compatible. VB ActiveX method that you are using, requires an IDispatch interface as parameter. If you use ActiveX Data Object (ADO) instead of CRecordset class then you will be able to pass the object to your VB ActiveX methods. I have included the link to samples in my previous post. These will help you get started.
I hope this helps.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hii,
If so please tell me how to do the connections and which header files i have to include please..I dont have idea adout ADO..I am using access database.will you tell me about connection and all..i am doing that only ok..
Please help me out...
Thanks in advance,
Savitri
|
|
|
|
|
Please see the links from my previous post. Following might also help Using ADO from VC++[^]
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Are you allergic to following directions? He's provided you with what you require...twice.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
I want to develop a USB Small project which show all information about USB Device like USB Device name,drive name and file or folder name.Plz help me..
|
|
|
|
|
|
|
OK. So you are using SetupAPI to query USB information. I believe, once you get hold of the device you can use the regular CreateFile, ReadFile, FindFirstFile etc API
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
can you give me some example..
Plz help me
|
|
|
|
|
|
thax's Sohail Kadiwala
it is working..thx's once again..
|
|
|
|
|
Glad I could help.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
i have a problem to add these values in listbox.Problem is that i want to show according data.I mean first i want to show drive name then it's data then other drive name then it's data. Right now it is showing but mixed shoe.Code is here
[code]
DWORD dwDrives=GetLogicalDrives();
if(0==dwDrives)
{
// return FALSE;
}
DWORD dwCount=0;
char chDriveLabel='A';
char szRootpath[5]={0,0,0,0,0};
while(dwDrives !=0)
{
if ((dwDrives & 1) != 0)
{
sprintf(szRootpath,"%c:\\",chDriveLabel);
//removable drive
if(DRIVE_REMOVABLE==GetDriveType(szRootpath))
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
//Removable dirve lable
// std::cout <<"Files in " << szRootpath << std::endl;
m_ListCountries.ActivateTopParent();
m_ListCountries.AddString(szRootpath);
AfxMessageBox(szRootpath);
//* represent search all files and directories
szRootpath[3]='*';
hFind=FindFirstFile(szRootpath,&FindFileData);
if (INVALID_HANDLE_VALUE == hFind)
{
// return FALSE;
}
// List all the files in the directory .
do
{
//ignore the sub directories
if (!(FindFileData.dwFileAttributes &
FILE_ATTRIBUTE_DIRECTORY))
{
// std::cout << FindFileData.cFileName << ":";
m_ListCountries.AddString(FindFileData.cFileName);
// m_ListCountries.UpdateData(false);
AfxMessageBox(FindFileData.cFileName);
}
}while (FindNextFile(hFind, &FindFileData) != 0);
FindClose(hFind);
}
}
dwDrives = dwDrives >> 1;//next drive
chDriveLabel++;
}
[/code]
plz help me..
|
|
|
|
|
|
|
ex. I am address from memory is : char *s = "0x003c2750". I want get value of s ?
|
|
|
|
|
|
Naveen wrote: char cValue = *s
may be with a semi-column too.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote:
may be with a semi-column too.
compiler role will come to play than [ ]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Well, s value is just 0x003c2750 .
Possibly you need *s value.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
i think everyone is missing the point stated in the qns.
the qns states that
char* s = "0x12345567"
which is a null terminated string
and the poster wants to get the value of the memory 'pointed' by the string (not the pair of quotes around the address.
Thus *s will not work.
what you need to do is to parse the char* into a int or long (depending on whether it's 32bit or 64bit)
I believe this is what you wanted (thou it's almost 5 mths late )
char* s = "0x0012ec08";
char* stopString;
long address = strtol(s,&stopString,16);
void* pPointer = (void*)address;
depending on what is the value you want, you will then type cast pPointer to whatever type, for example
byte* pByte = (byte*)pPointer;
|
|
|
|
|
Hi,
I need to get the state of Radio Button ,According to the Radio button state i need to change the text on one push button.
Plz Advice.
Preethi.
|
|
|
|
|
Using raw Win32 use the BM_GETCHECK[^] message or the Button_GetCheck[^] macro. If using MFC you can use the CButton::GetCheck function.
Steve
|
|
|
|
|
Events and delegates are your friends here. This will let you change your button text anytime the selected radio button changes. Check google for more details. There should be plenty of tutorials out there. You may even find some code snippets in the articles here that do something similar.
Dybs
|
|
|
|
|
dybs wrote: Events and delegates are your friends here.
Delegates? Are you thinking of C#?
Steve
|
|
|
|