|
Is there any way to use the "Run As Other User" dialog box from my project with out having to create my own?
I have been searching the net and MSDN. Although, I have found tones of imformation, there does not seem to be a function (undocumented or otherwise) to "Run As Other User".
Sugestions, books, etc... will be appriciated.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hello,
I am using an activex control in my vc++ application and I would like to have the equivalent of an control array in vb. I tried to map the events using ON_EVENT_RANGE and adding a 1st parameter
on every event function as an index in the array. I declared the array as an array of pointers to the activex objects.
But it doesn't work.
So, can this be done? Am I doing something wrong?
|
|
|
|
|
Below is snippet of my compile output for my application. As you can see, I am having linking problems. Any suggestions?
PS - I apologize for this message being a little long, but figured it would be better to post the whole compile errors for all gurus.
Linking...
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q
BEPBDXZ) already defined in log4cplusD.lib(category.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(void)" (??1?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in log4cplusD.lib(category.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::operator+=(c
lass std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in log4cplusD.lib(category.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::operator+=(c
har const *)" (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in log4cplusD.lib(threads.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(char const *,class basic_
string<char,struct std::char_traits<char="">,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z) already defined in log4cplusD.lib(category.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "bool __cdecl std::operator==(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,char const *)" (??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocat
or@D@2@@0@PBD@Z) already defined in log4cplusD.lib(priority.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class basic_string<char,s
truct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in log4c
plusD.lib(category.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::operator=(cl
ass std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in log4cplusD.lib(layout.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::assign(class
std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) already defined in log4cplusD.lib(categ
ory.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::length(void)const " (?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@
@QBEIXZ) already defined in log4cplusD.lib(priority.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class basic_string<char,s
truct std::char_traits<char="">,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z) already defined in log4cplusD.lib(layout.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::fail(void)const " (?fail@ios_base@std@@QBE_NXZ) already defined in log4cplusD.lib(layout.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE
IXZ) already defined in log4cplusD.lib(category.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::runtime_error::runtime_error(class runtime_error::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0runtime_error@std@@QAE@ABV?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z) already defined in log4cplusD.lib(pointer.obj)
libcpmtd.lib(iostream.obj) : error LNK2005: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(iostream.obj) : error LNK2005: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(locale0.obj) : error LNK2005: "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(ios.obj) : error LNK2005: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(ios.obj) : error LNK2005: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmtd.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __malloc_dbg already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _free already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@
@QBEPBDXZ) already defined in log4cplusD.lib(category.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(void)" (??1?$basic_str
ing@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in log4cplusD.lib(category.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::operator+=
(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in log4cplusD.lib(category.obj); second definition
ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::operator+=
(char const *)" (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in log4cplusD.lib(threads.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(char const *,class basi
c_string<char,struct std::char_traits<char="">,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z) already defined in log4cplusD.lib(category.obj); secon
d definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "bool __cdecl std::operator==(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,char const *)" (??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$alloc
ator@D@2@@0@PBD@Z) already defined in log4cplusD.lib(priority.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class basic_string<char
,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in log
4cplusD.lib(category.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::operator=(
class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in log4cplusD.lib(layout.obj); second definition ig
nored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::assign(cla
ss std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) already defined in log4cplusD.lib(cat
egory.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::length(void)const " (?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@st
d@@QBEIXZ) already defined in log4cplusD.lib(priority.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class basic_string<char
,struct std::char_traits<char="">,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z) already defined in log4cplusD.lib(layout.obj); second definition ignor
ed
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: bool __thiscall std::ios_base::fail(void)const " (?fail@ios_base@std@@QBE_NXZ) already defined in log4cplusD.lib(layout.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q
BEIXZ) already defined in log4cplusD.lib(category.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::runtime_error::runtime_error(class runtime_error::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0runtime_error@std@@QAE@ABV?$basic_str
ing@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z) already defined in log4cplusD.lib(pointer.obj); second definition ignored
libcpmtd.lib(iostream.obj) : warning LNK4006: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(iostream.obj) : warning LNK4006: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(locale0.obj) : warning LNK4006: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll); second de
finition ignored
libcpmtd.lib(locale0.obj) : warning LNK4006: "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(locale0.obj) : warning LNK4006: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(ios.obj) : warning LNK4006: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(ios.obj) : warning LNK4006: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(ios.obj) : warning LNK4006: "protected: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmtd.lib(ios.obj) : warning LNK4006: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
LIBCMTD.lib(dbgheap.obj) : warning LNK4006: _malloc already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMTD.lib(dbgheap.obj) : warning LNK4006: __malloc_dbg already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMTD.lib(dbgheap.obj) : warning LNK4006: _free already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMTD.lib(dbgheap.obj) : warning LNK4006: __free_dbg already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMTD.lib(crt0dat.obj) : warning LNK4006: _exit already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMTD.lib(fflush.obj) : warning LNK4006: _fflush already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMTD.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMTD.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMTD.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMTD.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
Creating library ../../../../lib/libSharedNetConnectionManagerD.lib and object ../../../../lib/libSharedNetConnectionManagerD.exp
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMTD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
../../../../Debug/bin/libSharedNetConnectionManager.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
|
|
|
|
|
File and directory names are Unicode strings and many (most) non-MS apps don't handle them properly.
The Unicode version of openfile dialog can handle 32K characters for a path name while the ANSI version does ~260. This is a good reason alone to always use the Unicode version. Another is if someone uses a non-European language for a directory name.
My question is how can this be done and still have the app work on Win98/ME ?
If an MFC app is built with the Unicode setting on, does one need to install the "Unicode layer" dll's onto a Win98/ME machine?
I thought that I checked and MFC, even when set to Unicode, still limits paths to MAX_PATH. Is there a standard solution?
Is there any advantage in making just the file handling portion of the code wide character?
|
|
|
|
|
The 260 char limit causes me grief when working with shared files on our dept. server. There are lots of files in a highly structured organization.
Adding the UNC name, share name, the long folder names and file names- it would often go beyond what the file utility I used could handle.
(Besides, there is a newly disccovered flaw in some anti-virus programs. They also can not go beyound 260 character paths, so virus infected files can hide in deeply nested directories.)
Richard
|
|
|
|
|
I have gotten this from time to time. Eventually it aggrivated me to an extent that I just changed my project settings.
In Pre-compiled headers, set it to "Automatic" (for all configurations.) Then you will never see this error again.
"When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
|
|
|
|
|
I have no idea why. When I create a new SDI or MDI MFC-Application, compile the wizard generated code, open the aboutbox -> crash
It also crashes even if I want to display a simple messagebox.
Would be nice if someone could help me.
|
|
|
|