|
How do you get the functions exported by the dll and the detailed description of their arguments
Thank you in advance
Samir Sood;)
Samir Sood
|
|
|
|
|
http://www.mindcracker.com/mindcracker/c_cafe/dll/dll_tut1l.asp
Please refer this .....Basically u need to inform the compiler using some macros that these functions need to be exported
Cause is my effort;
Effect is God's effort
|
|
|
|
|
SamirSood wrote:
How do you get the functions exported by the dll...
The Depends utility that ships with Visual Studio is good for this.
SamirSood wrote:
...the detailed description of their arguments
See this article.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
However, unless the functions are decorated C++ ones, Depends will not be able to provide much by way of parameter information;
Sometimes you can get a very small hint, if the exported name has @nn after it, since that tells you the size of all the parameters, but of course, you still need to be able to read the disassembly to work out a bit more by way of context
Steve S
|
|
|
|
|
Hi there...
i'm new here with vc++ n i need a little help please...
1. i need a drop down box n query the value from a database.
2. from the drop down, when the user made the selection, the system will do another query and output the result in a data grid table.
it sounds so simple but how do u actually do it with Visual C++
could somebody please help
thanks
``````````
|
|
|
|
|
To handle a change in the combobox, provide a handler for the CBN_SELCHANGE message. To get the value in the edit portion of the combobox, use GetWindowText() .
How are you communicating with the database (e.g., directly, ODBC, DAO)?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
thanks for the reply....
i'm using odbc for the connection with an access database, and still is confuse on how to connect by the way.... could you help to explane which is the easiest way...
thanks
``````````
|
|
|
|
|
|
i think i got it on how to query and all.. but few silly question...
1. where actually do i put it in my app?
2. how do i take the result from the query and put it an a listbox.??
thanks
``````````
|
|
|
|
|
Sorry, LamLie but these are not questions that can be answered with short and simple sentences. Not to instult you or anything but if you are new to database programming then you must read a few articles on how to move from one record to another and how to store them. Personally, I prefer ADO because that's the one that I learned how to use. Codeproject has a section and databases and you will find a lot of helpful articles in there.
// Afterall, I realized that even my comment lines have bugs
If the sun were to blow up, it would take us 7-8 minutes to realize it.
|
|
|
|
|
yup.. i am quite new with database in C++, actually in vc++ it self..
but i think i got it for now... and will post back later if i come to a halt.
thanks for the help.
``````````
|
|
|
|
|
Good day,
I'm creating a program that compiles visual C++ program so that i dont
have to switch and make the project active, since i have a lot of projects
on my workspace.I perform the compilation by creating a process so that the
main process could not be affected by its slow compiling..
UINT CompileReleaseMode(LPVOID pParam)
{
::WaitForSingleObject(g_eventStartRelease, INFINITE);
....
....
if(!CreateProcess(NULL,"msdev e:\\app.dsw /MAKE \"app - Win32 Debug" /REBUILD /OUT
c:\\Status.log", NULL, FALSE......);
WaitForSingleObject( pirelease1.hProcess, INFINITE );
}
In my dialog i have a listbox where i could put the filtered compilation message based from the log file(status.log). So i created another thread to read the file(running parallel with the first process) or have it back-up so that i could read the current change of file and reflect to the listbox the filtered message.
My problem now is that when the thread the reads the log file(it generates an error).
How can i access the content of the file or get the last line that have been updated.
(we can see that file has been updated as compilation process.. by executing
type status.log on command prompt.
Thanks a lot and have nice day
sphynxs
|
|
|
|
|
Instead of using msdev.exe and a log file, use cl.exe instead. It sends everything to stdout which can be captured and displayed accordingly. This is what msdev.exe is doing. The contents of the Output window is actually what cl.exe would otherwise send to stdout. Check out these two articles:
http://support.microsoft.com/default.aspx?scid=kb;en-us;190351
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
How can i cast varEnum to CString e.g VARENUM vt=VT_I2;
Now i want to show that VT_I2 through string. How can i do that.
Thanx in advance
Regards
INAM
Inam
|
|
|
|
|
Hi All,
May be i have created a my thread in Wrong Forum. Sorry about that.
I am writing a event listen for Internet Explorer, For that i am trying to get the connection point interface
for IDocHostUIHandler .interface.
static const GUID IID_UIHANDLER =<br />
{0xBD3F23C0,0xD43E,0x11CF,{0x89,0x3B,0x00,0xAA,0x00,0xBD,0xCE,0x1A} };<br />
<br />
bool bAdvise = FALSE;<br />
DWORD someCookie;<br />
bAdvised = AfxConnectionAdvise(m_pValidPtr,IID_UIHANDLER,m_pValidPtr->GetInterface(&IID_IUnknown),TRUE, &someCookie);<br />
The function returns false. Can anybody explain me why function returns false?
Thanks in Advance
AL
|
|
|
|
|
You need to get the pointer to dispatch id IDispatch not IUnknown
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Hi Prakash,
Thanks for quick reply,I forget to mention that parameter "m_pValidPtr" is a
pointer to the class derived from CCmdTarget..
I tried to change from IIUnkown to IDispatch.
But its still returning false. Could you please explain why ??
Again thanks in advance
|
|
|
|
|
according to me the code it totally wroung, who is the sink and who is the src.
to get the dispatch pointer you do the following thing
IDispatch * pDisp = m_psinkPtr->GetIDispatch(FALSE);
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Err my mistake
Here the src is Web Browser control(m_pIE) and sink (m_pIEEventsr) a pointer to object dervied from CCmdTarget.
Here is a revised sample.
<br />
bAdvised = AfxConnectionAdvise(m_pIE,IID_UIHANDLER,m_pIEEvents->GetIDispatch(FALSE),TRUE, &m_iDocCookie);<br />
Where i am wrong, can't I retrive interface for IDocHostUIHandler this way?
Thanks
|
|
|
|
|
The code looks correct, i dont know wheather this line is working or not coz you didnt say it is.
If it is still not working,then only factor that is giving the error is IID_UIHANDLER assuming ther other interface pointers are valid.
when you created the class derived from CCmdTarget did you check Automation support ( i dont know this will give error but i dont create sinks without it coz it creates the dispatch maps)
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
I am writing a program that displays static text on a black background. I can change the CStatic object backgound color to black or I can set the space behind the text to the standard light grey color I.E the space directly behind the text not the entire CStatic area (toggle m_staticTextBgd see below).
I want to change this light grey to another color. I tried SetSysColors but I dont want to change this at a system level.
Thanks
if (nCtlColor == CTLCOLOR_STATIC )<br />
{<br />
CWnd *Ctrl = GetDlgItem(pWnd->GetDlgCtrlID());<br />
if (Ctrl)<br />
{<br />
CRect Rect; <br />
Ctrl->GetWindowRect(&Rect);<br />
this->ScreenToClient(&Rect);<br />
COLORREF Clr = this->GetDC()->GetPixel(Rect.left-1, Rect.top-1);<br />
DeleteObject(hbr);<br />
hbr = CreateSolidBrush(Clr);<br />
if(!m_staticTextBgd)<br />
pDC->SetBkColor(Clr);<br />
pDC->SetTextColor(RGB(m_fntR,m_fntG,m_fntB));<br />
pDC->SetBkMode(m_staticTextBgd?OPAQUE:TRANSPARENT);<br />
}<br />
}<br />
return hbr;
---
|
|
|
|
|
Coremn wrote:
COLORREF Clr = this->GetDC()->GetPixel(Rect.left-1, Rect.top-1);
Coremn wrote:
hbr = CreateSolidBrush(Clr);
Coremn wrote:
return hbr;
You retruning the brush with the old screen color rite, then how is the color going to change ?
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Mr.Prakash wrote:
return hbr;
You retruning the brush with the old screen color rite, then how is the color going to change ?
hbr is the background screen color, in my case black. This colors in the excess space in the CStatic where there is no text, I.E making the unused space blend in with the background, I want the space behind the actual text to be colored, this is done by not using pDC->SetBkColor(Clr); in the method OnCtlColor. But I dont know how to change this from light gray.
---
|
|
|
|
|
pDC->SetBkMode(TRANSPARENT) will do the trick.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Greets all,
I have an app that loads a monochrome bitmap and displays it in a Static Control where I later allow the user to resize the bitmap by dragging the edges of a rectangular selection box around the bitmap.
Now what I want to do is to save this newly sized bitmap to file. I have tried and so far when I write the bitmap to file and later view it all I am seeing is a blank image (i.e. all white).
I think the problem lies in my call to the GetDIBits() function. in the MSDN docs, it says that I have to make sure the bitmap is not currently selected into a device context.
So my question is, how do I unselect the Bitmap from a Device Context??
.:. Keno .:.
|
|
|
|