|
I have created the service, using that how could i read the file on other system of same workgroup.
|
|
|
|
|
I have downloaded an MDI project.
The PROBLEM is when I insert any ActiveX component or control to any of the dialogs and run, Iam unable to VIEW the dialog to which I had added the ActiveX. That specific dialog is not popping up.
The PROBLEM occurs specific to THIS PROJECT only.
Is there any project settings to be done for enabling ActiveX controls.
Please help me out.
I thank u in advance.
Mughi
|
|
|
|
|
is there a call to OleInit() in the initinstance of the application.
Still Alive!!!
Thank you God.
|
|
|
|
|
THANK YOU for your help Mr.PRAKASH.
I got it working through AfxEnableControlContainer().
|
|
|
|
|
Add the command
AfxEnableControlContainer();
in your Apps InitInstance()-Method !!!
e.g.
/////////////////////////////////////////////////////////////////////////////
// CMyApp initialization
BOOL CMyApp::InitInstance()
{
AfxEnableControlContainer();
greets al
|
|
|
|
|
THANK YOU for your help Mr.EIWE.
I got it working.
|
|
|
|
|
Quick Q.
Does anyone know how to tell what service pack/s, if any, has been installed on my Visual C++ Dev. environment?
There are no obvious clues from the About dialog at all!
I Dream of Absolute Zero
|
|
|
|
|
search here at CP. there is a VS AddIn that shows
the ServicePack number.
|
|
|
|
|
Cheers!
I Dream of Absolute Zero
|
|
|
|
|
|
Of course, the best question is, will VSSP6 ever come out of beta testing...
Steve S
|
|
|
|
|
How To Disable a System Service like Messenger?
What rights do i need to Disable a System service ?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Actually there is very easy way to do it...but i dont remember ..but the alternative method is...
Run regedit.exe and find for "RUN" or got to this
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
and on right hand side u will see the list of application getting loaded..
just right click and delete them...
regards
Balkrishna Talele
|
|
|
|
|
|
Thanks a bunch
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
It is well known that the client loads the DLL within its process space.
Now if 10 differenct clients use the same DLL, is it that there will be 10 copies of the DLL with the 10 clients. If yes, is it possible to resolve this.
Also, DLLCanUnloadNow() checks if there are any clients attached to this DLL.
From the above statement, if each client loads a separate copy of the DLL into its process space, what is the reason to check whether multiple clients are using this DLL ?
|
|
|
|
|
You need a good book to know about DLLs,
amar_shinde wrote:
Now if 10 differenct clients use the same DLL, is it that there will be 10 copies of the DLL with the 10 clients
no 10 copies of the dll is not made, only one is made, but loading an address space into a process is bit tricky issue, it involves the knowledge of LDT (local discriptor table)
amar_shinde wrote:
Also, DLLCanUnloadNow() checks if there are any clients attached to this DLL.
This check is done my the OS when each clients start unloading the DLL, or in some case in a fixed interval or time.
Generally a global variable called as reference count is incremented or decremented depending upon loading or unloading, When this reference count is zero the dll code has the option to unload itself from the memory by returing appropriate value.
Still Alive!!!
Thank you God.
|
|
|
|
|
You might have been correct in 16-bit Windows; in 32- and 64-bit Windows, you should treat them as separate copies. Behind the scenes, Windows maps read-only pages to the same physical memory and maps writeable pages as copy-on-write (i.e. a copy is made the first time the page is written to). The programmer shouldn't worry about this.
If you need to share data between different copies of a DLL, you should either mark a section of the image as shareable and ask the compiler to store your shared data there, or use memory-mapped files. Memory-mapped files are generally easier to understand.
The DllCanUnloadNow entry point is only relevant to, and called by, COM. The COM runtime calls it when releasing an object instance or calling IClassFactory::UnlockServer (not necessarily immediately). If it returns TRUE , COM will eventually call FreeLibrary to unload the DLL.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Mike Dimmick wrote:
If you need to share data between different copies of a DLL, you should either mark a section of the image as shareable and ask the compiler to store your shared data there
humm, hard to agree with you. I think long back (in 32bit windows) i have used global variable for reference count, may be it was static, dont exactly remember it. But certainly i did not declare the memory area as shareable.
Still Alive!!!
Thank you God.
|
|
|
|
|
I need to initialise the global variables, so when I attempt the following, an error message appears.Any suggestions appreciated
in stdafx.cpp file
#include "stdafx.h"
int g_SomeGlobalVariable = 0;
and in stdafx.h file
extern int g_SomeGlobalVariable = 0;
|
|
|
|
|
Omit the "extern int g_SomeGlobalVariable" in the header file. You must use this "extern"-statement in the files from which you want to access your global variable (it's only for the linker).
MS
|
|
|
|
|
You needn't to do that. Let the declaration in the stdafx.h (because stdafx.h is included in all source files generated by AppWizard), but omit the initialization ( = 0 ). Global and static variables must be initialized only in the source file.
Robert-Antonio
"Czech Railways discovered, that in case of disaster the most damaged wagons were the first and the last. So they decided to create trains without them."
|
|
|
|
|
I don't know if you are completely right. Certainly, you get an errormessage on an assignment in a header file. But in this case I wouldn't be amazed if the whole "extern"-statement is a problem, because his globalVar isn't "extern" in this case. I didn't try out. Anyhow, I wouldn't place an "extern"-statement in the stdafx.h, even because it is included everywhere else. But that's a question of the point of view.
MS
|
|
|
|
|
Another way of doing the same would be declare it static. So in the stdafx.h you can write like
static int gi_var = 0;
|
|
|
|
|
That wouldn't be a true global variable then. That makes n variables all with file scope.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|