|
Thanks, I think this is waht I was looking for.
|
|
|
|
|
Hi,
I have an application in VC++ 6.0 which generates a tree from the database files.
This application allows to open more than one instaces.
First I start the first instance of this application and opens a database file which generates the tree.(Now the data is present in the memory variables. When I save the project the data is stored in the Workspace).
Now I start the second instance of same application and open the same database file (which I opened in first instance of this application). But I want to restrict this second instance of application to open the same data files(which is already opened in the first instance). Because this will pose danger to the data.
Plz any ideas/samples/project send it to me.
I will be very greatfull for your help and support.
Thanks & Regards,
Neeraj
|
|
|
|
|
You need to open your database as exclusive. This will restrict any other application (including second instance of same application) to open the database.
Another suggestion is to make your application single instance, i.e. only one instance can be run. See following for details:
http://www.codeproject.com/threads/simplesingleinstanceapp.asp
Arsalan Malik
|
|
|
|
|
Adding to the above answer, you can also communicate between the instances (Check the IPC Section) to filter the selection to just this database
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi,
I was trying recompile my VC++6.0 to VC++ .Net. When i try to load in VC++ .net it says an unspecified error. then i made a new solution. Added a new MFC extension DLL. and copied the source files. Then all the files got compiled. But it is giveing a linket warning and error as given below..
I feel these are just setting issue. Can some one help.
MSDN Help says include a definition of the _check_commonlanguageruntime_version OR link with nochkclr.obj.
i am new to .net. Can someone Help.
Cheers
Siva
==================================
PersistenceInterface.obj : warning LNK4217: locally defined symbol ??1CEDataTypeMap@@UAE@XZ (public: virtual __thiscall CEDataTypeMap::~CEDataTypeMap(void)) imported in function "protected: virtual __thiscall IEPersistent::~IEPersistent(void)" (??1IEPersistent@@MAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CList::~CList(void)" (__imp_??1?$CList@PAVCEDataTypeMap@@PAV1@@@UAE@XZ) referenced in function "public: virtual __thiscall CEDataTypeMapList::~CEDataTypeMapList(void)" (??1CEDataTypeMapList@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CEDataTypeMap * & __thiscall CList::GetNext(struct __POSITION * &)" (__imp_?GetNext@?$CList@PAVCEDataTypeMap@@PAV1@@@QAEAAPAVCEDataTypeMap@@AAPAU__POSITION@@@Z) referenced in function "public: virtual __thiscall CEDataTypeMapList::~CEDataTypeMapList(void)" (??1CEDataTypeMapList@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct __POSITION * __thiscall CList::GetHeadPosition(void)const " (__imp_?GetHeadPosition@?$CList@PAVCEDataTypeMap@@PAV1@@@QBEPAU__POSITION@@XZ) referenced in function "public: virtual __thiscall CEDataTypeMapList::~CEDataTypeMapList(void)" (??1CEDataTypeMapList@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const CEDataTypeMapList::`vftable'" (__imp_??_7CEDataTypeMapList@@6B@) referenced in function "public: virtual __thiscall CEDataTypeMapList::~CEDataTypeMapList(void)" (??1CEDataTypeMapList@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CMap > >,char const *,class CEDataType *,class CEDataType *>::~CMap > >,char const *,class CEDataType *,class CEDataType *>(void)" (__imp_??1?$CMap@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBDPAVCEDataType@@PAV3@@@UAE@XZ) referenced in function "public: virtual __thiscall CEDataTypeMap::~CEDataTypeMap(void)" (??1CEDataTypeMap@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CMap > >,char const *,class CEDataType *,class CEDataType *>::GetNextAssoc(struct __POSITION * &,class ATL::CStringT > > &,class CEDataType * &)const " (__imp_?GetNextAssoc@?$CMap@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBDPAVCEDataType@@PAV3@@@QBEXAAPAU__POSITION@@AAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@AAPAVCEDataType@@@Z) referenced in function "public: virtual __thiscall CEDataTypeMap::~CEDataTypeMap(void)" (??1CEDataTypeMap@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct __POSITION * __thiscall CMap > >,char const *,class CEDataType *,class CEDataType *>::GetStartPosition(void)const " (__imp_?GetStartPosition@?$CMap@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBDPAVCEDataType@@PAV3@@@QBEPAU__POSITION@@XZ) referenced in function "public: virtual __thiscall CEDataTypeMap::~CEDataTypeMap(void)" (??1CEDataTypeMap@@UAE@XZ)
ErosDTs.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const CEDataTypeMap::`vftable'" (__imp_??_7CEDataTypeMap@@6B@) referenced in function "public: virtual __thiscall CEDataTypeMap::~CEDataTypeMap(void)" (??1CEDataTypeMap@@UAE@XZ)
Message.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const CEMessage::`vftable'" (__imp_??_7CEMessage@@6B@) referenced in function "public: __thiscall CEMessage::CEMessage(class ATL::CStringT > >,long,enum EMessageType)" (??0CEMessage@@QAE@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@JW4EMessageType@@@Z)
PersistenceInterface.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CMap > >,char const *,class CEDataType *,class CEDataType *>::RemoveAll(void)" (__imp_?RemoveAll@?$CMap@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBDPAVCEDataType@@PAV3@@@QAEXXZ) referenced in function "protected: virtual __thiscall IEPersistent::~IEPersistent(void)" (??1IEPersistent@@MAE@XZ)
PersistenceInterface.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const IEPersistent::`vftable'" (__imp_??_7IEPersistent@@6B@) referenced in function "protected: virtual __thiscall IEPersistent::~IEPersistent(void)" (??1IEPersistent@@MAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CList::~CList(void)" (__imp_??1?$CList@PAVCESearchType@@PAV1@@@UAE@XZ) referenced in function __unwindfunclet$??0CESearchTypeList@@IAE@XZ$0
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct __POSITION * __thiscall CList::AddTail(class CESearchType *)" (__imp_?AddTail@?$CList@PAVCESearchType@@PAV1@@@QAEPAU__POSITION@@PAVCESearchType@@@Z) referenced in function "protected: __thiscall CESearchTypeList::CESearchTypeList(void)" (??0CESearchTypeList@@IAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall CESearchType::CESearchType(void)" (__imp_??0CESearchType@@IAE@XZ) referenced in function "protected: __thiscall CESearchTypeList::CESearchTypeList(void)" (??0CESearchTypeList@@IAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const CESearchTypeList::`vftable'" (__imp_??_7CESearchTypeList@@6B@) referenced in function "protected: __thiscall CESearchTypeList::CESearchTypeList(void)" (??0CESearchTypeList@@IAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CList::CList(int)" (__imp_??0?$CList@PAVCESearchType@@PAV1@@@QAE@H@Z) referenced in function "protected: __thiscall CESearchTypeList::CESearchTypeList(void)" (??0CESearchTypeList@@IAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: virtual __thiscall CESearchType::~CESearchType(void)" (__imp_??1CESearchType@@MAE@XZ) referenced in function "protected: virtual void * __thiscall CESearchType::`scalar deleting destructor'(unsigned int)" (??_GCESearchType@@MAEPAXI@Z)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CList::RemoveAll(void)" (__imp_?RemoveAll@?$CList@PAVCESearchType@@PAV1@@@QAEXXZ) referenced in function "protected: virtual __thiscall CESearchTypeList::~CESearchTypeList(void)" (??1CESearchTypeList@@MAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CESearchType * & __thiscall CList::GetNext(struct __POSITION * &)" (__imp_?GetNext@?$CList@PAVCESearchType@@PAV1@@@QAEAAPAVCESearchType@@AAPAU__POSITION@@@Z) referenced in function "protected: virtual __thiscall CESearchTypeList::~CESearchTypeList(void)" (??1CESearchTypeList@@MAE@XZ)
SearchType.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct __POSITION * __thiscall CList::GetHeadPosition(void)const " (__imp_?GetHeadPosition@?$CList@PAVCESearchType@@PAV1@@@QBEPAU__POSITION@@XZ) referenced in function "protected: virtual __thiscall CESearchTypeList::~CESearchTypeList(void)" (??1CESearchTypeList@@MAE@XZ)
Debug/ErosDTs.dll : fatal error LNK1120: 20 unresolved externals
===================================
|
|
|
|
|
Look at this:
<br />
CImageList *m_pimagelist = new CImageList();<br />
m_pimagelist->Create( 16, 16, ILC_COLOR8, 0, 4);<br />
<br />
HICON icon = AfxGetApp()->LoadIcon( IDI_ICON1 );<br />
if( icon == NULL )<br />
;
<br />
int ret = m_pimagelist->Add( icon );<br />
ret = m_pimagelist->Add( icon );<br />
ret = m_pimagelist->Add( icon );<br />
<br />
int count = m_pimagelist->GetImageCount();<br />
<br />
<br />
SetImageList( m_pimagelist, TVSIL_NORML );<br />
<br />
CImageList *p = GetImageList(TVSIL_NORML);<br />
<br />
if( p == NULL )<br />
;
How come that “SetImageList( m_pimagelist, TVSIL_NORML )” Doesn’t work?
All suggestions are welcomed!!
_____________________________
...and justice for all
APe
|
|
|
|
|
Hello Friends,
I couldn't able to display a bitmap file which is present at the location "c:\images\1.bmp" in the view whenever i execute my program. Please help regarding this matter.
thank you,
Bye friends
|
|
|
|
|
|
hi,
My programming background is c,c++ and C#. Now i am little bit crazy abt VC++ and MFC. i don't know which book is too very good for beggners like me.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
I believe that for beginner VC++ 6 by sams publisher is best. later on shift to MSDN. (I know nothing about .NETness)
|
|
|
|
|
Hello Friends,
I am here again with a new query.
I am doing a project where I have to display 2 bitmap images in a single row and the number of rows depends on the number of bitmap images present in the directory from where we display the bitmap images. the images should be displayed only on 120 x 120 like a thumbnail view in the windows explorer.
Bye bye
thank you
|
|
|
|
|
Hello
Get the number of bitmaps to show. Create those many butons with size 120 X 120 at runtime. Arrange them on screen by calculating client area. Load the bitmaps on buttons.
Regards,
Prashant
|
|
|
|
|
Hi Prashant,
Can u please explain with code and what are the type of buttons to be used.
Bye bye
Thank you
|
|
|
|
|
Hi all,
I need a listbox, containing all clients attached to my domain. When using WNetOpenEnum, I only get the clients which are running right now. a switched off client does not show up.
I also need a list of users in my domain.
I need my program running un my DomainController, so it should be quite easy to have access to all data.
When using WNetOpenEnum, I can pass an argument GLOBALNET, but the results are somehow confusing. Documentation is quite poor on this subject.
The projects I found here, only show running clients.
Can anybody help?
e-DJ
|
|
|
|
|
You need to use NetUserEnum() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks,
looks like this is what I was searching for. I will try as soon as time permits
e-DJ
|
|
|
|
|
HI,
My module is to send and receive messages through the com port.
For that i've to set the com port using vcpp.
I've to use 2 dialog box , 1 for com port settings and another is to send and receive characters thro' 2 multi line edit boxes using 2 control buttons.
For port settings,i've to use combo box.
PLs help me.
mithila
|
|
|
|
|
Hi
My Client application is supposed to read files stored on server. My requirement is not to share server drives. So I created a hiden user on server and shared drives for it. When I launch my application on client machine I use CreateProcessWithLogonW and swith to the hidden user so that I can access the file on server. This works fine.
But I have given automation support for my application. When a third party application call createdispatch of my client application dispatch gets created but my application doesnt get desktop. Also the calling application cant get dispatch handle back.
If I stoppped locading profile through CreateProcessWithLogonW then everything works fine on XP but it gives problem on 2k.
What can be a solution for this problem.
Regards,
Prashant
|
|
|
|
|
What things are important to understand before driving a class form any object(CButton , CWnd etc) can some one provide me a detailed link ;P
|
|
|
|
|
How do I create a new class that derives directly from CObject using Class Wizard? When I use Class Wizard to create a new class, CObject is not one of the available options in the Base Class list.
-Ian
|
|
|
|
|
Change class type to "Generic Class" and type CObject in base class list. The wizard will ask you to include appropriate header, because it will not find a header for CObject. So, include afx.h in your header file.
Arsalan Malik
|
|
|
|
|
Thanks! I was trying to add the class by opening class wizard, then selecting Add Class... \ New.... This does not give me the option of adding a generic class. However, if I use Insert \ New Class, I am given this option.
Thanks again! (that was driving me nuts)
-Ian
|
|
|
|
|
HI,
My module is to send and receive messages through the com port.
For that i've to set the com port using vcpp.
I've to use 2 dialog box , 1 for com port settings and another is to send and receive characters thro' 2 multi line edit boxes using 2 control buttons.
PLs help me.
mithila
|
|
|
|
|
Where are some good sites for a C ++ beginner to get code help at?
|
|
|
|
|
I heard about CodeProject... It seems to be a good one
Seriously, there is also CodeGuru (www.codeguru.com). For the others, I don't know, codeproject is enough for what I need
|
|
|
|