|
I am using Install Shield Express 5.0 to create an installation wizard for my application. My application requires 3DChartM.ocx file to be registered in windows registry which will be there in the C:/winnt/system32 directory.
How to I include windows registry information into my installation wizard so that user need not manually register it. When he runs the setup it should take care of registering the ocx file also. But i am unable to do this.
Please let me know if anybody knows about this.
vidya
|
|
|
|
|
You should create a file group in InstallShield and set that group to Self Registered. Then, in Script, you must call few commands to register such ocx files. See help for more information
|
|
|
|
|
thank you ....now it is working for me..
i set the properties of the file 3DChartM.ocx as self registered.
Now it is registered and working fine,
Thanks
vidya
|
|
|
|
|
I am developing an application for embedded XP using VC++ 6.0 as the development env. Since the UI is touch screen based i need to display the soft keyboard for text input.
Can Any one tell me the Win API to display the keyboard and to customize it what all i have to do..
The Similar API are available for WinCE development..E.G. SipShowIM();
Thanks And Regards
Amit
|
|
|
|
|
I am not sure there is one outside of the WinCE stuff. However it is relatively simple to produce one. You just need an array of buttons that map to the associated keys. Or some other alternative.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thanks for ur reply.
What about Multilanguage support..
Amit
|
|
|
|
|
Hi All,
I'm not wonderfully experienced in COM programming.
I've written an app which captures video frames from a DV Camcorder to a file (in a proprietary format). It works well, which is nice.
In essence, I am:-
1. Creating an IGraphBuilder and an ICaptureGraphBuilder2
2. Adding the MSDV filter for the camera & adding an ISampleGrabber.
3. using the ICaptureGraphBuilder2 to build the filter graph.
So, in step 3, ICaptureGraphBuilder2 is adding some extra filters to the graph to complete the chain (in fact, it adds a Smart Tee, DV Decoder, and a Video Renderer.
My confusion it that i'm unsure on how i should be cleaning up when i'm finished.
I can Release() the pointers to the interfaces that I created, but what about the filters that ICaptureGraphBuilder2 created? will they be released automatically when I release the IGraphBuilder ?
Or, should I enumerate all the filters in the graph and IFilterGraph::RemoveFilter() them?
Are there any tools available that can list instances of COM objects that I create, and spy on their reference counts?
Thanks for any info
JOn
#include <beer.h>
|
|
|
|
|
Jon Hulatt wrote:
Are there any tools available that can list instances of COM objects that I create, and spy on their reference counts?
The easiest way is by inspection of the value returned by release - however remember that functions that correctly obey the rules of COM will AddRef / Release depending on the parameter type (for example adding a filter to a graph is an [in] parameter which will force an AddRef), so you'll have to compensate for this when you look at the values.
However, if possible, you don't want to be doing this. COM, and especially DirectShow are hideously frustrating beasts to cleanup (as I'm sure you've found out ), so much so that you really don't want to have to.
Where possible use smart pointers which abstract away the intricies of calling AddRef and Release. The two most obvious starting points are boost::shared_ptr (which will need a custom delete function) or the CComPtr / CComQIPtr classes provided as part of ATL.
One of the other things I've learnt from experience is that when DirectShow applications start to fall over, they do it in a really big way. Make sure that each operation that you complete can be rolled back. This becomes fairly nasty if something throws an exception - the only solutions I've found for this is to use RAII for each operation (for example adding filters or connecting pins) that you complete on a graph.
* Create the graph and DirectShow interfaces
* Create Filters
* Add the filters to the graph
* Set the properties for the filters in the graph (this step may need to be repeated / delayed until after having connected the pins of the filters)
* Connect the pins for the filters (I do this manually to avoid the chance that DirectShow will insert intermediate filters in stupid places)
* Start the graph
Do the operations for your application
* Stop the graph
* Disconnect the pins of the filters
* Remove the filters
* Destroy the filters
* Destroy the graph and DirectShow interfaces
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Thanks for the pointers; i'll try them out. Hopefully it'll make things work a bit better!!
Regarding destruction of filters that DirectShow adds automatically; do you know if when you Release() the graph, DirectShow will Release remaining filters it holds a reference too?
Or, does it only Release() when filters are removed from the Graph?
Thanks!
Jon
#include <beer.h>
|
|
|
|
|
I'm not 100% sure, but I don't believe it does. I tend not to give it the chance to try - if you force it to do exactly what you want there is less chance of something going wrong. Running in debug should tell you if there are any unreleased COM objects lying around if you want to check.
IMO It's just as easy to manually remove the filters when you're done.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Dear all
i want to use the "Print to file" windows functionality in my win32 SDK (No MFC) application. Is there any way i can do it? Also i want that no dialog boxes should be display as it appears in windows print dialog box.
____________________________________________________________
rishabhs
I think therefore I am.
|
|
|
|
|
If I had a very simple program which was spread over two projects, e.g.
Project 1 called "print" containing print.c:
#include <cstdio>
extern void printsomething();
void main (void)
{
printsomething();
return;
}
Project 2 called "printsomething" containing printsomething.c:
#include <cstdio>
void printsomething();
void main (void)
{
printf("Hello world! from printsomething main.\n");
return;
}
void printsomething ()
{
printf("Hello world!\n");
}
... where the "printsomething" is a dependancy of "print" why don't they link to produce the "print.exe".
|
|
|
|
|
Hi,
In XP OS, if we open more than one application instance (2 - 3 word instances), in the taskbar, toolbar button goes in group button(dropdown button), if we right click on the toolbar button, it will display the menu (cascade, tile horizontally, minimize group, close group). I need to find out the exe name (winword.exe), when I right click on drop down toolbar button. Is it possible please help.
Thanks in Advance
|
|
|
|
|
HWND hwndShell = FindWindow(TEXT("Shell_TrayWnd"), TEXT(""));
HWND hwndReBar = FindWindowEx(hwndShell, NULL, TEXT("ReBarWindow32"), TEXT(""));
HWND hwndMsTask = FindWindowEx(hwndReBar, NULL, TEXT("MSTaskSwWClass"), TEXT("Running Applications"));
HWND hwndToolBar = FindWindowEx(hwndMsTask, NULL, TEXT("ToolbarWindow32"), TEXT("Running Applications"));
here u've a sample to retrieve window handle of the toolbar where your group belong to.
this group is only a button.
so now u should use toolbar functions to retrieve specified info. i think in case u've to get selected item. or handle oncontextmenu.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
|
Hello to all!Hope anyone could figure out my problem... i have a program in VC++ 6.0(w/ sp6) and created a Release version... i have compiled and it runs in my pc so well. So i think i will have no problem distributing it to another pc. When i distribute the Released Exe, the program cannot proceed, just the login session and then it exits... when i try to traced the error, i found that i having trouble with _CommandPtr->ActiveConnection. here is the code snipet..
void CBPLSAssessmentApp::AuditTrail(CString MCode, CString ATable, CString DObject)
{
CBPLSAssessmentApp *pApp = (CBPLSAssessmentApp*)AfxGetApp();
CString sQuery,sCurrentDate;
COleDateTime m_vodtMonth,m_vodtDay,m_vodtYear,m_vodtSaveTime;
_RecordsetPtr pRSet = NULL ,pRights = NULL;
_CommandPtr pCmd = NULL;
try // CTS 02022004 add try and catch
{
pCmd.CreateInstance(__uuidof(Command));
pCmd->ActiveConnection = m_pConnection; // <-- this is the culprit
sQuery = "insert into a_trail values ";
sQuery+="('"+ SetStrLength(sUser,10) +"',";
//m_vodtSaveTime = COleDateTime::GetCurrentTime();
m_vodtSaveTime.ParseDateTime(GetSystemDate());
sCurrentDate.Format("%04d-%02d-%02d %02d:%02d:%02d",
m_vodtSaveTime.GetYear(),
m_vodtSaveTime.GetMonth(),
m_vodtSaveTime.GetDay(),
m_vodtSaveTime.GetHour(),
m_vodtSaveTime.GetMinute(),
m_vodtSaveTime.GetSecond());
sQuery+=" '"+sCurrentDate +"',";
sQuery+=" '"+ SetStrLength(MCode,10) +"',";
sQuery+=" '"+ SetStrLength(ATable,30) +"',";
sQuery+=" '"+ SetStrLength(m_sComputerName,30) + "',"; // JJP 10112003 for Manila Workstation
sQuery+=" '"+ SetStrLength(DObject,200) +"')";
pCmd->CommandText = _bstr_t(sQuery);
pCmd->Execute(NULL, NULL, NULL);
}
catch (_com_error &e)
{
_bstr_t bstrDescription(e.Description());
MessageBox(NULL,LPCTSTR("CBPLSAssessmentApp:AuditTrail\n"+bstrDescription),APP_NAME,MB_OK);
exit(1);
} // CTS 02022004 add try and catch
}
as you notice, i have a try and catch but when i run the program... its passes through but no values is being catched...
can anyone figured it out?
|
|
|
|
|
My guess would be that the pCmd.CreateInstance(__uuidof(Command)); is failing, and so your (smart) pointer is NULL when you dereference it on the next line. This will not give a COM exception, but probably an access violation (0xC0000005), which is not being caught.
I would suggest testing pCmd after the CreateInstance , and also adding in a catch(...) block, and see what exception (if any) is caught there.
|
|
|
|
|
Graham Bradshaw wrote:
I would suggest testing pCmd after the CreateInstance, and also adding in a catch(...) block
how can i test for the _CommandPtr? i already catch it but no access violation or com exception has been produced... i also compiled my program in another computer and then transfer the exe to another computer and it works very well... so i think my computer has a problem about the msado15.dll where database pointers originates.... ive test and compiled it in 2 different computers and distribute the exe and its running fine... but then again, i tried once more to my computer and it fails... is there a possibility to overwrite my msado15.dll? how can i know if im using the right dlls for ado connections?
|
|
|
|
|
Hi, I am a newbie. I am currently working on a research. I need to create a specific packet such as a TCP/IP packet or a DICOM packet over ethernet. After i create this packet, i have to send them through a network. Do anyone have any idea on where can i download a C or java programming source code on creating a specific packet over ethernet and send it through a network? Can anyone please provide some useful web sites that can guide me through this?
Thank you very much!
|
|
|
|
|
Its been a long time since I did this, but 10 years ago... I could do this with linux, but I ran into some bugs in the TCP/IP stack. I wouldn't be surprized (though I don't know) to find out that windows does not allow you to send arbitary packets.
Richard W. Stevens wrote the books on this subject, (he died a few years back, so they are somewhat out of date, but still worth looking at) check out Amazon or the like for his network programing books. It is all unix specific, but still highly recomended.
I discovered that I could not send just any ethernet packet. Most hardware will not allow you to set your own ethernet checksum! (this was a big deal, I was supposed to test a router to make sure it checked the checksum)
Even if I remembered how to do this, I wouldn't tell you. There is too much potential to do evil. I crashed many routers in the lab (of many different brands), and I have no reason to belive they have been fixed as what I was doing is illegal. Basicly, I'm hoping that if you are smart enough to figure this out, you are also smart enough to not unleash it on the world.
In short, if you can live with standard network programing, basic client server stuff, there are plenty of examples on the net, start searching. If you want to go deeper, don't be surprized if there are walls you cannot overcome.
|
|
|
|
|
Hi, first of all , i would like to thanz you for your reply. Actually i am currently an undergraduate. The problem i am facing now is regarding to my thesis. In my thesis , i am required to write a program to generate packets and send them over a network. All these have to be done in a Linux environment. To be more precise, i have to generate a DICOM packet. I have done research on DICOM packet and i found that DICOM sits on a upper layer than TCP/IP. Therefore, i have to know how to create/generate a TCP/IP packet before i can generate the DICOM packet.
Since you have experiences in doing this, can you pls provide me some useful web sites where i can search for some example codes that can be my references? I have a question here and i hope that you can help me out with it.
1. If i want to write a C program to generate a TCP/IP packet, how could i include the structure definitions of the packet in the program? (e.g. the size of header, payload or etc?)
I am currently in a mist in doing this and i sincerely hope that you can provide me with some guidances.
Thank you!
|
|
|
|
|
First off all let me say I work in the medical IT industry and know how extensive the DICOM standard is. We (UltraRAD Corporation) outsourced most of the low-level network communications for our products, however maybe I can give some insight. I believe The DICOM standard sends data from an Upper-layer protocol sitting above TCP/IP, like FTP,SMTP,etc...
So I don't believe your TCP/IP packet, that you create, is going to be a custom TCP/IP packet, it will follow the IETF standard. Look more into Ethernet network layers for that info. Now your 'DICOM Packets', I think these are command sets check the standard, you make will be passed to TCP/IP in a data stream, I don’t have specific implementation on that for Linux. All this is described in medical.nema.org PS 3.8-2003 section 9.
Hope that rambling helps somehow,
~rlc
|
|
|
|
|
Thank you for your reply. Do you also deal with TCPDump (a sniffer which is used to capture packets include DICOM packet).
I am using TCPDump from David Clunie's site to support DICOM packet capture . However, i have a few questions on the operation of tcpdump in supporting DICOM packet capture.
What i understand here is, DICOM is in a layer upper than TCP layer so if
TCPDump can only work up till TCP layer, it is impossible for it to
capture DICOM packet unless there is something specified in the header
of the TCP packet that this TCP packet is actually a DICOM packet and
therefore it can be captured by the TCPDump and identified it as a
DICOM packet.
3) Can you please explain to me in detail on:
a)how do we recognize the DICOM packet in TCP layer?
b)DICOM "packet" is a DICOM Image Object encapsulated in a TCP packet and the TCP packet encapsulted in the IP packet. Is there any specifications in the header of the TCP/IP packet which allows us to recognize the DICOM packet which is encapsulated in the TCP/IP packet?
Hope that you are willing to start correspoding to me now. I really need your help to clear out my problems. Thank you very much!
Regards,
Yee
|
|
|
|
|
Dear:
I building ISAPI filter that will block user when requests size reach specific number, example: i will redirect the user to Error Page when the size of requests reaches 200k.
My question what is the way to count the size of all requests to IIS.
Thanks
|
|
|
|
|
You can get the size by OnReadRawData() function.
das
|
|
|
|
|