|
Hello everyone,
I am wondering when function DllRegisterServer will be invoked? I am using Visual Studio 2005 to develop an in-process native (unmanaged) C++ COM. I am wondering when it will be invoked?
1. During the build process or during the DLL initialization process?
2. I find this function only works for debug mode, not release mode. Is that correct?
In MSDN,
http://msdn2.microsoft.com/en-us/library/ms682162.aspx
there are not too much information about when this method will be invoked and whether it works for both debug mode code and release mode code.
thanks in advance,
George
|
|
|
|
|
DllRegisterServer it's typically called when you need to register the COM component (for instance, by regsvr32 ). Note: usually Visual Studio registers the component as (if I remember well) a post build step.
George_George wrote: 2. I find this function only works for debug mode, not release mode. Is that correct?
No. The function must work also in release mode, otherwise you cannot deploy (the release mode) component.
Hope that helps.
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.
|
|
|
|
|
Thanks CPallini,
I do not explicitly call regsvr32 in build process. For the build process, I
simply use Visual Studio 2005 IDE to build.
I suspect regsvr32 invokes DllRegisterServer since I set the following
option to yes in debug configuration,
Linker --> General --> Register Output to yes
But I am not sure. Any comments?
regards,
George
|
|
|
|
|
George_George wrote: I do not explicitly call regsvr32 in build process. For the build process, I
simply use Visual Studio 2005 IDE to build.
I suspect regsvr32 invokes DllRegisterServer since I set the following
option to yes in debug configuration,
Linker --> General --> Register Output to yes
Custom build step is at
Project | Properties | Custom Build Step | Command Line.
Here you will find something like
regsvr32 /s/c "$(TargetPath)"<br />
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
Regards,
Paresh.
|
|
|
|
|
The OP was VS 2005 (quite similar indeed).
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.
|
|
|
|
|
Yes, CPallini! I should be somewhere else as you pointed out.
regards,
George
|
|
|
|
|
Thanks Paresh,
But there is nothing in Project | Properties | Custom Build Step | Command Line in my Visual Studio 2005. So I think there should be something else which runs regsvr32 to register the values in Windows Registry.
regards,
George
|
|
|
|
|
Your guess is exact, as Visual Studio documentation states:
Register Output
Run regsvr32.exe /s $(TargetPath), which is valid only on .dll projects. For .exe projects, this property is ignored. If you want to register an .exe output, set a postbuild event on the configuration to do the custom registration that is always required for registered .exe files.
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.
|
|
|
|
|
Cool, thanks!
regards,
George
|
|
|
|
|
hi...
i am using pocket pc version 5.0.
i have to add vertical as well as horizondal scroll bars...
what is the procedure?
paulraj
|
|
|
|
|
Did you declare their messages?
|
|
|
|
|
Hello Friends,
I am using win32 Application. In which I need to create the Tab Control. I have created the Tabs using following code, But don't know how to add Control in particular TAB. Can anybody tell me how to do this.
Following is the code I am using to create the TAB.
HWND WINAPI DoCreateTabControl(HWND hwndParent)
{
RECT rcClient;
HWND hwndTab;
TCITEM tie1, tie2;
GetClientRect(hwndParent, &rcClient);
InitCommonControls();
hwndTab = GetDlgItem(hwndParent,IDC_TAB1);
tie1.mask = TCIF_TEXT | TCIF_IMAGE;
tie1.iImage = -1;
tie1.pszText = L"TAB 1";
tie2.mask = TCIF_TEXT | TCIF_IMAGE;
tie2.iImage = -1;
tie2.pszText = L"TAB2 ";
TabCtrl_InsertItem(hwndTab, 0,&tie1);
TabCtrl_InsertItem(hwndTab, 1,&tie2);
return hwndTab;
}
Thnx in advance..
|
|
|
|
|
GauranG33 wrote: don't know how to add Control in particular TAB.
You cant add so. Actually we should process hide and show of each controls according to the current tab. For example, if there is a button in the first tab and an edit control in the second, then when the first tab is active, we have to hide the edit control and show the button. Similarly we have to hide the button and show the edit when the second tab is active.
More for flexibility, we are using property sheets. In that controls for each tab are placed in different dialogs. Means one dialog for each tab. And when a particular tab is active then all the dialogs except that for this particular tab will be made hidden. So only the controls in the current tab(dialog) will be visible.
- NS -
|
|
|
|
|
http://www.codeproject.com/shell/ShellExtGuide4.asp
on this guide is pointed how to create a shell extension that will be activated on right-mouse drag.
can somebody point out if it is possible to have a shell extension that will be activated at left-mouse drag ?
|
|
|
|
|
Hi,
how to get the current date and time of system in a string.
|
|
|
|
|
Use of GetSystemTime and the use of CString::Format .
|
|
|
|
|
|
|
<br />
CTime time;<br />
CString str;<br />
time=CTime::GetCurrentTime();<br />
str.Format("%d:%d:%d",time.GetDay(),time.GetMonth(),time.GetYear());<br />
See this, chandu004 give this to me.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Hi,
Go with following code.
SYSTEMTIME t_time;
GetLocalTime(&t_time);
CString strLatesttime;
strLatesttime.Format("%.d-%.d-%.d %.d:%.d:00",t_time.wMonth,t_time.wDay,t_time.wYear,t_time.wHour,t_time.wMinute);
Rahul Vaishnav
|
|
|
|
|
hi,
you can get system current time in a string using this coding,
CTime curTime = CTime::GetCurrentTime();
int curDay = curTime.GetDay();
int curMnth = curTime.GetMonth();
int curYear = curTime.GetYear();
CString curDate = curTime.Format("%m/%d/%Y");
panthal
|
|
|
|
|
Hi all,
I want to update a SQL database on a click event as follows.
<br />
void CSRFDBDlg::OnBnClickedAdd()<br />
{<br />
UpdateData( TRUE ) ;
<br />
CString conStr ;
HRESULT hr ;<br />
_variant_t vtData ;<br />
<br />
conStr.Format ("SELECT * FROM RecordData") ;<br />
<br />
ADODB::_ConnectionPtr pConn ;<br />
ADODB::_RecordsetPtr pRecSet ;
<br />
try<br />
{<br />
if(GetADOCon (srf_SQL, pConn, pRecSet))<br />
{<br />
hr = pRecSet->Open ( _bstr_t(conStr), pConn.GetInterfacePtr(), ADODB::adOpenDynamic, ADODB::adLockOptimistic, -1);<br />
<br />
pRecSet->AddNew() ;<br />
<br />
int int_val = 345 ;<br />
vtData.vt = VT_INT;<br />
vtData.intVal = int_val ;<br />
pRecSet->PutCollect(L"Destination List", vtData) ;<br />
<br />
pRecSet->Update() ;<br />
pRecSet->Close() ;<br />
<br />
pConn->Close () ;<br />
}<br />
}<br />
<br />
catch ( _com_error &e )<br />
{<br />
PassComError ( e ) ;<br />
}<br />
}<br />
Here "Destination List" is one of the column of the table of database. Actually there are three more, but I set all of them allowed to NULL values. So need to worried about them, right? GetADOCon() also can be useful to you guys.
<br />
BOOL CSRFDBDlg::GetADOCon(CString ConStrTran, ADODB::_ConnectionPtr &pConn, ADODB::_RecordsetPtr &pRecSet)<br />
{<br />
HRESULT hr;<br />
BOOL bRet = FALSE;<br />
CString csErrMess;<br />
<br />
try <br />
{<br />
hr = pConn.CreateInstance(__uuidof(ADODB::Connection)); <br />
if (FAILED(hr))<br />
{<br />
return bRet;<br />
}<br />
<br />
hr = pRecSet.CreateInstance(__uuidof(ADODB::Recordset));<br />
if (FAILED(hr))<br />
{<br />
return bRet;<br />
}<br />
<br />
hr = pConn->Open((_bstr_t)ConStrTran, L"", L"", -1L);<br />
if (FAILED(hr))<br />
{<br />
csErrMess.Format ( "Open Database connection Failed ConnStr = %s\r\n" , ConStrTran );<br />
return bRet;<br />
}<br />
else<br />
{<br />
bRet = TRUE;<br />
csErrMess.Format ( "GetConnPtrs Successful for : %s" , ConStrTran );<br />
}<br />
}<br />
catch ( _com_error &e )<br />
{<br />
PassComError ( e );<br />
<br />
}<br />
return bRet;<br />
}<br />
I've try this now almost more than two days, the things is my code doesn't give any error, at compile time or at runtime. Can you guys tell me where I'm going wrong. Now I'm wried with this
I appreciate your help all the time...
Eranga
|
|
|
|
|
Software Engineer / Server (SES)
- bachelor (famous college prefer) or above degree in computer science, mathematics or relevant majors
- 3+ years C++ SW development experience.
- 1+ years IT system development experience (database, web, Internet)
- demonstrated experience of OOD / design pattern
- Strong learning and troubleshooting abilities, cooperative and self-motivate spirits
- Be able to communicate with foreign engineers in English.
CVs to: zhenjun.cao@elektrobit.com
Software Engineer / Client (SEC)
- bachelor (famous college prefer) or above degree in computer science or relevant majors
- 1+ years JavaScript/Java development experience.
- 1+ years IT system development experience (database, web, Internet)
- Good knowledge of regular expression.
- demonstrated experience of OOD / design pattern
- Strong learning and troubleshooting abilities, cooperative and self-motivate spirits
- Be able to communicate with foreign engineers in English.
CVs to: zhenjun.cao@elektrobit.com
|
|
|
|
|
Hi,
I want to add event on a picture using mouse click using vc++ .The picture is a button of a calculator and th ebutton should work as it is.
Hi, I am Joy .I am interested in doing software development based on .net platform(basicallly vc++,vb and asp)
|
|
|
|
|
You need a button with a picture inside it?
- NS -
|
|
|
|