|
hi ,
We are creating a setup for our APPLICATION using Microsoft Install Shield for VC++.
Our application has
(a) 6 MFC and SYSTEM Dlls which are shared(the target system may or may not have the MFC Dlls).
(b) 4 ocx components(one "msflxgrd.ocx" and three developed by us, so the target system has may have the "msflxgrd.ocx" or may not)
The rest of the components have to be registered and we have done them successfully.
(c) 3 dlls which required to be registered.
(d) Few more Dlls and exe(s) required for our application.
I have built my InstallShield on the Windows XP system.
Queries:
1. Do i need to use separate Dlls(SYSTEM Dlls) for Different OS during the build as my application was not being able to find the "msvcrt.dll" on the target Windows 98 machine.
2. How can i remove (during uninstallation) the registry entries created by our own components while installing.
3. We are copying all the Dlls and OCX components to the "system32" folder which have to be registered. These components should not overwrite(or) show a message "component already exists on the target system.
Do you want to overwrite existing?".( i have seen this option in few application(s) setup(s).How do i get this using MS Install Shield.
Thanks and Regards
|
|
|
|
|
I am trying to call ShellExecute or WinExec in my Win NT service application.
When i am running it as simple win32 application, both of the functions executes well but when it is run as service under LocalSystem account, both of them dont work. what to do???
How can i execute another .exe file from current program????
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
> I am trying to call ShellExecute or WinExec
> in my Win NT service application.
> ... both of them dont work.
ShellExecute and WinExec both work fine and your process gets created. You just don't see the window of your application because it's on a wrong desktop. To modify this tell your service to be interactive:
Administrative Tools > Component Services > Services (local) >
> double click your service > Tab: "Log On" > Check: "Allow service to interact with desktop"
Although you will see the application now, it will still run under the local System account (often unwanted). To modify this behaviour use CreateProcessAsUser rather than ShellExecute or WinExec :
STARTUPINFO si;
PROCESS_INFORMATION pi;
si.cb = sizeof(STARTUPINFO);
si.lpReserved = NULL;
si.lpTitle = NULL;
si.lpDesktop = "WinSta0\\Default";
si.dwX = si.dwY = si.dwXSize = si.dwYSize = 0L;
si.dwFlags = 0;
si.wShowWindow = SW_SHOW;
si.lpReserved2 = NULL;
si.cbReserved2 = 0;
CreateProcessAsUser(hToken,NULL, szMyApp, NULL, NULL, FALSE,
0, NULL, NULL, &si, &pi);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess); How to get the security token of a logged-on user? There are several ways, but I usually simply *steal* it from explorer.exe (via OpenProcessToken ). As an example check the nRunAsLoggedOnUser function here[^] (=some handy service helper routines from CISCO).
RK
|
|
|
|
|
hi there..
thanks for your time..
i needed to know if its possible to know if a control is UI Activated already or not? and secondly which function is called when a control is UI DeActivated?
regards
safee
|
|
|
|
|
Hi...
I'm currently trying to creat an installer for distribution of my project. A setup project has been created for the purpose.
But the problem is that I dont want the registry setting for the application to be overwritten if the application already exist in the computer. Only d necessary upgrades will be updated to the old program.
Can anybody give me a clue on how to get it done?
Thank you
|
|
|
|
|
What installer program have you used ?
The installer programs generally have an option where you could tell it NOT to overwrite registry entries.
if urs don't have that option , don't make the entires in the installer instead make them from ur program which will be in a position to check for already made entries in registry
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I'm sorry, I should have told this earlier. I'm creating one using the Setup and Deployment Project wizard in Visual Studio.
Under the Registry Editor, I've set the property to AlwaysCreate property to false but it still overwrites the registry keys eventhough it exist. Do I still have to add a condition?
Thank you
|
|
|
|
|
I have developed a non mfc application using vc++ 6.
I have designed the interface for this application as a vb ocx.
Now i have the vb ocx which contains all the interface for my applications
and now what i need is to know how i can use this vb ocx in my vc++ application as an interface to my vc++ application.
Just give me an idea like i create a form in vb and put some images and controls and make it into a ocx.
Now i need a solution how i can make that form visible in vc++ application
as an interface.
Thanks in advance
vimal
|
|
|
|
|
going n memory here, so forgive me if i make a mistake
with your project open in vc++
project menu
-- add to project
-- components and controls
-- registered activex controls
it should be listed there somewhere
double click in it and it should appear on your controls toolbox/bar thingy in your dialog editor
cheers
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
I need to send an extended ascii character to the active application with postmessage
PostMessage(msg->hwnd,WM_CHAR, 'a', 1)
Then it works where a is printed on the target window or any active window.
but when i use this like
PostMessage(msg->hwnd,WM_CHAR, 'þ', 1)
then the message is not sending the extended ascii character
I am using this in win98 and so i cannot use unicode character
i couldnt figure out the mistake i am making and so if there is anybody who can help me with this and find out and tell me out to send an extended ascii character to the application using postmessage
Thanks in advance
vimal
|
|
|
|
|
Hello most excellent CPians
My boggle [^]is thus :1 client connections the threads do not always perform properly and can "hang" when trying to accept a socket.
But it always performs properly when there is only 1 client connection.
I was wondering if anyone had any thoughts/suggestions/experience in this multithreaded nightmare on codestreet?
regards
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
Are the listening threads on the same port, or different ports?
|
|
|
|
|
|
What I/O model does the server utilize? You mentioned a non-blocking I/O, but which one?
In general, a design where each client corresponds to a unique workter thread on the server-side is overkill.
Kuphryn
|
|
|
|
|
|
Correct.
I was referring to the I/O model that the client/server utilizes such as WSAAsyncSelect, WSAEventSelect, Overlapped Model, and Completion Port Model.
Kuphryn
|
|
|
|
|
oh (sorry it took so long to get back to you but i was in NZ for me dad's birthday)
well
i'm not using any of the above (that i'm aware of), just using what i believe is standard berkley style sockets operations
cheers
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
I'm programming an application that can grab a frame from a video. DirectShow can help me to realize this function. 2 days ago I found an article named Extracting Bitmaps From Movies Using DirectShow (Written by Markus Axelsson) and downloaded its source code for reference, and then some problems accured. The source code could be built successfully in the environment of VC 6.0 and DirectX 9.0b, but could not execute properly. The application could not grab a frame from a MPEG file at all. In order to find the reason, I made test. Firstly, I ran the program in another computer, and its DirectX version was the same as my own computer's. The result was failure. Then I ran the program in a computer which DirectX version was 8.1, and I found surprisedly that a frame did have been extracted successfully from the MPEG file. The following test was to run the program in the environment of DirectX 6.4. The result was still failure. So my conclusion is that the program is only compatible with DirectX 8. The following code fragment is extracted from that source code I've downloaded. Through debug, I find the sentence "pMediaControl->Run()" will be wrong in DirectX 9. The return value of the function Run() is not 0 but 1. So my questions are:
Why does the error occur?
How to resolve the error?
>> Appendix 1:
The code fragment--
// Create graph builder
CComPtr<igraphbuilder> pGraphBuilder;
HRESULT hr = ::CoCreateInstance(CLSID_FilterGraph, NULL,
CLSCTX_INPROC_SERVER, IID_IGraphBuilder,
(void**)&pGraphBuilder);
if (FAILED(hr)) return hr;
ASSERT(pGraphBuilder != NULL);
// Create Grabber filter
CComPtr<ibasefilter> pGrabberBaseFilter;
CComPtr<isamplegrabber> pSampleGrabber;
AM_MEDIA_TYPE mt;
hr = ::CoCreateInstance(CLSID_SampleGrabber, NULL,
CLSCTX_INPROC_SERVER, IID_IBaseFilter,
(LPVOID *)&pGrabberBaseFilter);
if (FAILED(hr)) return hr;
pGrabberBaseFilter->QueryInterface(IID_ISampleGrabber,
(void**)&pSampleGrabber);
if (pSampleGrabber == NULL) return E_NOINTERFACE;
hr = pGraphBuilder->AddFilter(pGrabberBaseFilter,L"Grabber");
if (FAILED(hr)) return hr;
// Set media type
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
mt.majortype = MEDIATYPE_Video;
mt.subtype = MEDIASUBTYPE_RGB24;
mt.formattype = FORMAT_VideoInfo;
hr = pSampleGrabber->SetMediaType(&mt);
if (FAILED(hr)) return hr;
hr = pGraphBuilder->RenderFile(wFile,NULL);
if (FAILED(hr)) return hr;
CComPtr<imediacontrol> pMediaControl;
CComPtr<imediaevent> pMediaEventEx;
// QueryInterface for some basic interfaces
pGraphBuilder->QueryInterface(IID_IMediaControl,
(void **)&pMediaControl);
pGraphBuilder->QueryInterface(IID_IMediaEvent,
(void **)&pMediaEventEx);
if (pMediaControl == NULL || pMediaEventEx == NULL)
return E_NOINTERFACE;
// Set up one-shot mode.
hr = pSampleGrabber->SetBufferSamples(TRUE);
if (FAILED(hr)) return hr;
hr = pSampleGrabber->SetOneShot(TRUE);
if (FAILED(hr)) return hr;
CComQIPtr<imediaseeking> pSeek = pMediaControl;
if (pSeek == NULL)
return E_NOINTERFACE;
LONGLONG Duration;
hr = pSeek->GetDuration(&Duration);
if (FAILED(hr)) return hr;
int NumSecs = int(Duration/10000000);
REFERENCE_TIME rtStart = 1 * 10000000;
if (NumSecs < 1)
rtStart = 0;
REFERENCE_TIME rtStop = rtStart;
hr = pSeek->SetPositions(&rtStart, AM_SEEKING_AbsolutePositioning,
&rtStop, AM_SEEKING_AbsolutePositioning);
if (FAILED(hr)) return hr;
CComQIPtr<ivideowindow> pVideoWindow = pGraphBuilder;
hr = pVideoWindow->put_AutoShow(OAFALSE);
if (FAILED(hr)) return hr;
// Run the graph and wait for completion.
hr = pMediaControl->Run();
if (FAILED(hr)) return hr;
>> Appendix 2:
URL of the source article--
http://www.codeproject.com/audio/framegrabber.asp
|
|
|
|
|
Hi there
I got a message "Cannot access the ClassView information file. ClassView information will
not be available", when I open my workspace. can someone tell me why?
By the way, i also can not insert a new class.
Thanks
|
|
|
|
|
Your project's *.CLW file is readonly change that
Hope it helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
ya , thats true and it works!!! and will always work
cheers
balkrishna Talele
|
|
|
|
|
Check the propery of the *.clw file.If readonly ,it may cause the above question or u can delete *.clw file and VC6.0 will create a new *.clw file for u !
|
|
|
|
|
e.g.
int *pA = new int;
*pA = 10; //此时捕获事件?
SetAValue(10);
I don't want to overload the operator '='.
Can I do it?
or
What is the way the transaction of the database?
Best regards!
|
|
|
|
|
e.g.
int *pA = new int;
*pA = 10; //此时捕获事件?
SetAValue(10);
I don't want to overload the operator '='.
Can I do it?
Best regards
!
|
|
|
|
|
I had posted this query on COM forum, but on advise from Cata re-posting it here.
I'm quite new to VC++ programming. I need to develop an application which has independent pluggable modules (DLL ?) with the core application passing some arrays of data to the plug-ins and getting back the processed data from the plug-in. The core application should run without error even if any corresponding module (plug-in/DLL) is missing at run-time. The core application should also be able to detect any new plug-in and load it dynamically. Any changes to the plug-ins should not require the core application to be re-built.
Grateful if anyone could advise the best possible solution to the above mentioned task - use explicitly linked DLLs or use COM ? Any sample codes or articles available for this?
I'll be using VC++ 6.0. Thanks a lot in advance !
|
|
|
|