|
Is that a pure managed DLL or a mixed-mode DLL? How are you loading the DLL, directly or via reflection?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
It is mixed mode and I just have to recompile the static libs in 64 Bit Mode or obtain the 64 Bit Versions of the static libs. I think I will get this done now! Thanks a lot Chucker
|
|
|
|
|
Hi all ,
could someone explain what is the diffrent between this contructor
_bstr_t(
BSTR bstr,
bool fCopy
);
and this
_bstr_t(
const _bstr_t& s1
) throw( );
Do I have to free one of these afte use ?
Do i habe to the BSTR (for the first example) ?
Thanks very much
|
|
|
|
|
The second one is the copy constructor for _bstr_t. No, you don't need to do any SysFreeString, _bstr_t takes care of it when the destructor runs.
The first constructor, AFAIK, copies or "attaches" the BSTR to the _bstr_t instance, depending on the fCopy parameter. If you pass true, you need to SysFreeString the BSTR yourself.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
In the first ctor, if you pass FALSE for fCopy , the _bstr_t object takes ownership of the BSTR that you pass as the first parameter. If you pass TRUE , it does not, but instead makes a copy of the BSTR , which it then manages.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Hi
Do any one knows the use of
a Smart Pointer?
what is exactly a smart pointer?
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
"Speed is the Key to success"
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
|
Also take a look at the Boost smart pointers[^]
Note that shared pointers will become part of the C++ standard as they are included in TR1[^] - coming to a compiler near you, soon(er or later)
Edit: qfegd beat me to it , but he didn't get the link to TR1
P.S. how do you pronounce qfegd?
Graham
-- modified at 9:38 Friday 4th November, 2005
|
|
|
|
|
sorry sir, my finger slided too fast on my mouse button, and i unvoluntarily voted you down... all appologies
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote: sorry sir, my finger slided too fast on my mouse button, and i unvoluntarily voted you down...
No worries, mate
|
|
|
|
|
toxcct wrote: sorry sir, my finger slided too fast on my mouse button, and i unvoluntarily voted you down... all appologies
No worries! I voted 5 on your Behalf !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
qfegd = quo fas et gloria ducunt
|
|
|
|
|
qfegd wrote: qfegd = quo fas et gloria ducunt
sorry, i don't speak latin regularly this means ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
it mean:
Everywhere you go, glory will follow
Premature optimization is the root of all evil
|
|
|
|
|
Hi all
I'am using these member functions of CDC class to calculate the
monitor size. none of these functions return the correct value.
I need to calculate the exact size of the monitor.
you can also use this function in your PC and try.
double CMonSizeView::CalcSize()
{
CClientDC dc(this);
int width_mm = dc.GetDeviceCaps(HORZSIZE);//width in mm
int vert_mm = dc.GetDeviceCaps(VERTSIZE);//height in mm
//calculate the diagonal length in mm
double d = sqrt(width_mm*width_mm + vert_mm *vert_mm);
d = d*0.0393700787;//convert it in to inches
return d;
}
please give your feeback and suggestions.
thanks and regards
pradish
|
|
|
|
|
pradish wrote: I need to calculate the exact size of the monitor.
Why? What difference does it make if you have a 15" CRT or a 21" flat panel? Both of them are capable of displaying various resolutions. What you should be concernced about, if at all, is the resolution of the monitor.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Search the MSDN 2003 for the
"Video and Monitor Classes"
There are some class like
Win32_DesktopMonitor
Win32_DisplayConfiguration
...
..
U can try finding
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
pradish wrote: I'am using these member functions of CDC class to calculate the
monitor size. none of these functions return the correct value.
Is this Api Help GetMonitorInfo
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi all
I'am using these member functions of CDC class to calculate the
monitor size. none of these functions return the correct value.
I need to calculate the exact size of the monitor.
you can also use this function in your PC and try.
double CMonSizeView::CalcSize()
{
CClientDC dc(this);
int width_mm = dc.GetDeviceCaps(HORZSIZE);//width in mm
int vert_mm = dc.GetDeviceCaps(VERTSIZE);//height in mm
//calculate the diagonal length in mm
double d = sqrt(width_mm*width_mm + vert_mm *vert_mm);
d = d*0.0393700787;//convert it in to inches
return d;
}
please give your feeback and suggestions.
thanks and regards
pradish
|
|
|
|
|
Do the int width_mm and & vert_mm right for
the monitor u are using .
I mean have u tried to calculate the real heght
and width of your screen and compare it with
what u get it in the variables.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
-----> hr = db.Open(_T("SQLOLEDB.1"), dbinit);
if (FAILED(hr))
{AfxMessageBox("Failed To Connect Datasource"); }
My code is terminating on above line please help.
Actually senior programmer who developed code left for me to debug
help.
|| ART OF LIVING ||
|
|
|
|
|
RU are trying to connect to database
whose name is "SQLOLEDB.1" {it should be ".mdb",..)
Try specifying the full path name
of the data source.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|