|
Do you want to run a specific function exported from your dll?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
syntax : rundll32 DllName,FunctionName [Arguments]
Where FunctionName is an entry-point (any function) with the following prototype :
void CALLBACK EntryPoint(
HWND hwnd,
HINSTANCE hinst,
LPTSTR lpCmdLine,
int nCmdShow
);
Interesting stuff is that WinMain() has this prototype too, but this was easily predicted.
MSDN doc[^]
rundll.exe is the former 16-bit counter part (now legacy).
If the DLL is an in-proc COM component, you may instead use the DllHost.exe surrogate process, though it works differently.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
I'm calling rundll from VC6.
So the settings are:
Executable for debug session:
c:\windows\rundll32.exe
Working directory:
empty
Program arguments:
empty
Remote executable and path name:
empty
Where do I have to put the functionname?
Is it fn() or just fn without ()?
I don't have to state the dll-name, isn't it?
btw:
I've tried several combinations, but none of them work.
I can switch to release version if debug doesn't work.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
The functionname should be put in the Program arguments field, (may be with additional quotes to make sure that space chars are properly interpreted).
Your operating system already uses many times rundll32.exe xxx, so I guess this could help you figuring it out. Just do a search in the registry!
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
StephaneRodriguez wrote:
The functionname should be put in the Program arguments field
I entered this: ,functionname
whithout quotes or brackets, like it's defined in .def file.
Now rundll says that it cannot find the path to other dll's needed by my dll (mfc dll's I guess). But they are probably in windows\system directory.
I've also tried to enter my projects pathname, but that doesn't make any difference.
and another question:
I saw once that dll's are called by the RunDll-function, instead of the WinMain-function for regular apps. Is that true? Can't find it anymore.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
These are my codes about printing bitmap:
<br />
CDC dc;<br />
CPrintDialog printDlg(FALSE);<br />
if (printDlg.DoModal() ==IDOK)<br />
{<br />
dc.Attach (printDlg.GetPrinterDC());<br />
DOCINFO di;<br />
memset(&di,0,sizeof(DOCINFO));<br />
di.cbSize =sizeof(DOCINFO);<br />
di.lpszDocName ="ͼÏó´òÓ¡";<br />
CString filename="MONEY.bmp";<br />
HBITMAP bmp=NULL;<br />
bmp=(HBITMAP)LoadImage(NULL,filename,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);<br />
<br />
CBitmap bitmap;<br />
bitmap.Attach (bmp);<br />
BOOL bPrintingOK = dc.StartDoc(&di);<br />
CPrintInfo Info;<br />
Info.m_rectDraw.SetRect(0,0, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));<br />
StartPage(dc);<br />
<br />
<br />
CDC dcMemory;<br />
dcMemory.CreateCompatibleDC(&dc);<br />
<br />
dcMemory.SelectObject(bmp);<br />
BITMAP bm;<br />
bitmap.GetBitmap(&bm);<br />
<br />
dc.StretchBlt (0,0,bm.bmWidth,bm.bmHeight,&dcMemory,0,0,32,32,SRCCOPY);<br />
EndPage(dc);<br />
EndDoc(dc);<br />
DeleteDC(dcMemory);<br />
dc.Detach ();<br />
}<br />
DeleteDC(dc);<br />
<br />
The compiler told me there are 0 errors,but I can't see the bitmap appear on the paper after the program is executed.Why?
|
|
|
|
|
This is the classic case of trying to print a device-dependant bitmap (DDB). What you need to do is to convert the bitmap to a device-independant bitmap (DIB) before you print it. There are articles on www.codeguru.com[^] describing it and probably also here somewhere...
Look at the bitmap section[^] at codeguru for some code.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I have a CString variable.How can I add new line in it,something like this:
"firstline";
Then make it like this:
"firstline
second line"
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
CString theString = "Firstline\nSecondline";
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Can you help me with this program
Write a program to implement "Add to save" feature to a document. Hint: Use Timer event
|
|
|
|
|
Hint:
Use SetTimer and if using MFC use OnTimer function to handle event.
If using WTL create a OnTimer message cracker.
Developing with C++ is like programming by the seat of your pants
|
|
|
|
|
Hi everybody. Need build MDI application with tabbed view. Left pane of view must be scroll view and right pane must consist some control. Is anybody know simplest way how do it ? Thanks
|
|
|
|
|
Ranger wrote:
tabbed view...Left pane...right pane
Are you thinking of a tabbed view (PropertyPages) or of a splitter view, which has a bar between two views (like windows explorer)
|
|
|
|
|
Can anyone suggest me the line of codes and the data type of the field through which we can store files in an SQl Server Database through an ODBC Recordset
Samir Sood
|
|
|
|
|
http://www.codeproject.com/database/excel_odbc_write.asp
The idea is the same, u just have to modify it in a way that the driver is pointing to your SQL server and not Excel
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I Developed a Tree Control using Microsoft Tree Control API
in Win32 SDK. When i adding more nodes or items to the Tree Control i am getting memory problem, how can i avoid this problem ?
Any help...
thank you
|
|
|
|
|
how to creat service in vc++?
r00d0034@yahoo.com
|
|
|
|
|
|
|
Here[^] you can download an AppWizard for VC6.
Pavel
Sonork 100.15206
|
|
|
|
|
Hello there,
I used to below function to add string to RichEdit box, it works fine on Win98 or WinXP ... but it has bug in Win2000 !
Function:
void CResultDialog::AddText(CString str, COLORREF rgb, BOOL bold, BOOL italic, BOOL underline)
{
// get current length from rich text box ...
int nCurLen = m_Rich.GetTextLength();
// hide selected text !
m_Rich.HideSelection(TRUE, FALSE);
// move the cursor to end of rich control ...
m_Rich.SetSel(nCurLen, nCurLen);
// attach the new string to the last of rich edit ...
m_Rich.ReplaceSel(str);
int nStartPos = nCurLen;
int nEndPos = m_Rich.GetTextLength();
// configure the character format !
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
cf.dwMask = CFM_COLOR | CFM_BOLD | CFM_UNDERLINE | CFM_ITALIC;
cf.dwEffects = (unsigned long)~(CFE_ITALIC | CFE_UNDERLINE | CFE_BOLD | CFE_AUTOCOLOR);
cf.crTextColor = rgb;
cf.dwEffects |= underline ? CFE_UNDERLINE : cf.dwEffects;
cf.dwEffects |= bold ? CFE_BOLD : cf.dwEffects;
cf.dwEffects |= italic ? CFE_ITALIC : cf.dwEffects;
// select added text ...
m_Rich.SetSel(nStartPos, nEndPos);
// use character format !
m_Rich.SetSelectionCharFormat(cf);
m_Rich.SetSel(-1, -1);
}
I used this function in here:
AddText( "Company: ", RGB(255, 0, 0), TRUE, FALSE, FALSE );
AddText( "Microsoft", RGB(0, 0, 0), TRUE, FALSE, FALSE );
AddText( "\nContact: ", RGB(255, 0, 0), TRUE, FALSE, FALSE );
AddText( "Billi", RGB(0, 0, 0), TRUE, FALSE, FALSE );
AddText( "\nWeb: ", RGB(255, 0, 0), TRUE, FALSE, FALSE );
AddText( "www.m$.com", RGB(0, 0, 0), TRUE, FALSE, FALSE );
It has bug in Win2000,
The bug is colors on the text ...
I think it's because my enter character in my strings ...
Win98 or WinXP count enter character in for getting lenght but Win2000 doesn't it, or vice versa !
How can i solve it ??
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Tried \r\n (which is the normal return on Windows) ?
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hello there,
I made a MFC project by VC++ .NET and i choose Farsi language for one of my dialogs in my project ...
I put a button in the farsi dialog ...
I wrote farsi string in button and when i run it i see ASCII characters insted my farsi string !!!
What's wrong ??????
How can i solve it ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I have the same problem ,
Is it a vc.net's bug ? or i use it wrong ?
|
|
|
|
|
Hi,
I am using VC6.0++ with DAO & MS Access97! So far I use SQL successfully ... well except 2 thing:
*) With this: strSQL.Format ("SELECT * FROM Sample WHERE Title != 'Date'"); I can search the whole Sample table at column "Title" for string "Date"!
1) Let say to do the same, how can I search ... but at any cell has some thing (not empty string, or not empty field)?
2) In the table there is a column with define as COleDateTime, how can I search the same above technique for a equivalent COleDateTime day:
ie: Search for cell has "12/31/2001" in the column "Date"
I appreciate any help help here
Many thanks,
Anh
|
|
|
|
|