|
|
I have created a Deployment Program to set up a VS.net GUI application on a users machine. I think I need to perform a custom action to register an Active X Control on the users system as part of the Deployment Project. Basically an OCX is loaded on the users machine and registered.
To register I need to perform:
regsvr32 name.ocx. Does anyone know how to register an OCX as part of a deployment and setup program?
Jerry
|
|
|
|
|
Just add the OCX file to the Application folder, like any other file. That's it.
Pls let me know your status.
Sarvan AL
|
|
|
|
|
Does anybody have sample of converting text file to xml?
Thank you.
sun
|
|
|
|
|
Is your text file xml formatted or no?
|
|
|
|
|
if he wants to convert it to xml, I would assume it's not "xml formatted" ( whatever that means ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
there are usually no "pre-defined" ways to do this ( as far as i know ), it always depend on the input.
You need to parse the text file and extract what will be tags ( do you have something like that in your file ? ) and what will be the data.
How is your text file formatted ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
acutally it is PLC code
<br />
FUNCTION_BLOCK SR_IL (* SR flipflop in instruction *)<br />
VAR_INPUT<br />
S1 : BOOL; (* dominant set-input *)<br />
R : BOOL; (* none dominant reset-input *)<br />
END_VAR<br />
VAR_OUTPUT<br />
Q1 : BOOL; (* output *)<br />
END_VAR<br />
<br />
LD S1<br />
OR R<br />
RETCN (* return if both FALSE *)<br />
(* and do not assign a value to Q1 *)<br />
<br />
LD S1 (* no need to use R *)<br />
ST Q1<br />
<br />
END_FUNCTION_BLOCK<br />
I'm trying to convert it to xml format, I just need any text to xml conversion sample for general idea.
Thank you.
sun
|
|
|
|
|
If the file was XML based XSLT would be the answer. Since your file is not XML based you'll have to write your own parser (or find someone elses). If I was doing it I would use Spirit (from Boost) to do the parsing - especially if you have access to the BNF of the source format. Good luck.
Steve
|
|
|
|
|
HI ,
You can open any xml file in the text mode see the tag representation and then open your file in append mode and move in and place those tag there ,only the header needs to be fixed all the other tag can be any format(of your name) ,this is the raw way of converting it into xml format.
For example to add the header i will do something like this :-
<code>int CXmlWrite::AddHeader(CString& sHeader )
{
CString sAddHeader,sAddHeader1;
m_sHeader = sHeader;//store it needed for closing
sAddHeader.Format("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
m_fXmlWrite<<sAddHeader<<endl;
sAddHeader1.Format ("<%s>",sHeader);
m_fXmlWrite<<sAddHeader1<<endl;
return 1; // the count of numbers addedas header
}</code>
// this you need to place above between the inverted commas
//"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"
Hope it solves your problem
Regards
FarPointer.
-- modified at 10:16 Thursday 12th January, 2006
|
|
|
|
|
Thank you all for responding my query.
I'm working on it if I find any trouble I will contact you guys again.
sun
|
|
|
|
|
I need to dynamically retrieve ODBC parameters through code in Borland C++. Anyone any idea?
Many thanks
|
|
|
|
|
Priya..k wrote: ODBC parameters
What exact ODBC parameters? Can you please be more specific?
Koushik Biswas
|
|
|
|
|
I have to retrieve the username and password from the ODBC connection and use it in my program which has been developed using Borland C++ version 6. I am using a DataModule in my program where i set the DSN name and the username and password. But now i want to dynamically retrieve the username and the password from the odbc connection. Hence the program will be able to execute for any DSN on any machine.
Regards,
Priya
|
|
|
|
|
Aha! So you are trying to retrieve username and password for one or more DSN-s programmatically. I do not know your purpose, but providing you with a way of doing that is like providing a mechanism by which anybody can hack into a database and wreck havoc with privacy! How can you expect that the password will just be stored somwhere where you can go and pick it up from? If it is easy like that, it beats the purpose of a "password" doesn't it?
Now here is what you can do: DSN entries are all stored in the registry under either HKCU\ Software\ ODBC\ ODBC.INI or HKLM\ Software\ ODBC\ ODBC.INI (depending on whether they're User or System DSNs). You just have to read the correct registry key (key name = DSN Name). If you run regedit and drill down to that location, you will see all your DSN-s listed. For any DSN, the values listed are all or some of these:
Database, Driver, LastUser, Server, Trusted_Connection...
But Password is not stored in the registry. You cannot get the password. As I told you, Microsoft won't be in business long if they provided you a way of getting to that! I am sure the password is stored somewhere encrypted - even if you knew the location, you probably have to retrieve the encryption key to decrypt it. And on top of that, your executable would probably need to set administrative privileges for itself to do any of that.
Koushik Biswas
|
|
|
|
|
Hi
Tools like CPU-Z detect the manufactor of the build-in RAM with Serial Presence Detect (SPD) device on the RAM. How does this work? I think I need a driver on NT-based systems.
Can anyone give me a thought-provoking impulse?
Thanks,
André
'A programmer is just a tool which converts caffeine into code'
|
|
|
|
|
Have a stream of data that is not an IStream.
I am attempting to send this stream to GdiPlus api call "Image::FromStream(IStream*)" for display.
Is there a windows stream function that will do this(i.e. Make this conversion). I tried casting and that was unsuccessful.
|
|
|
|
|
Here is a program to show how this can be done:
#include "stdafx.h"
#include <objbase.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
CoInitialize(NULL);
char YourData[] = "Your data here.";
HGLOBAL hGbl = GlobalAlloc(GMEM_MOVEABLE, sizeof(YourData));
if ( hGbl )
{
LPVOID pMem = GlobalLock(hGbl);
if ( pMem != NULL )
{
memcpy(pMem, YourData, sizeof(YourData));
GlobalUnlock(hGbl);
IStream* pStream;
HRESULT hr = CreateStreamOnHGlobal(hGbl, TRUE, &pStream);
if ( SUCCEEDED(hr) )
{
// Use stream here!
char TestBuffer[1024];
ULONG Read;
hr = pStream->Read(TestBuffer, sizeof(TestBuffer), &Read);
if ( SUCCEEDED(hr) )
{
MessageBox(NULL, TestBuffer, "From the stream", MB_OK);
}
pStream->Release();
}
else
{
GlobalFree(hGbl);
}
}
}
CoUninitialize();
return 0;
}
Steve
|
|
|
|
|
I have a Arcom Digital I/O PCI card installed in my PC.
Now I would like to create a ActiveX control to set and read a few of these I/O channels.
What I would like is use this card in both an MFC application and Web Pages, so never need to use the cards API.
What type of ActiveX do I need to create and how with Visual Studio 7.1. All ActiveX examples I hav seen are done in Visual Studio 6.0
Any comments or links please.
|
|
|
|
|
IME, ActiveX normally means a COM object that has or implements some form of GUI. Sounds like you would just need to wrap the card's API with an automation-capable (automation-capable since you mention "web pages" ) COM object.
You would then be able to use this COM object from all kinds of clients to work with the card.
VS 7.1 should have a wizard (and buttloads of documentation) for creating a simple COM object and the MSDN docs will help you out with the design of the actual interface.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Does anyone have the source code for calulating the hyperbolic sine of an unknown angle, preferable in radian, ( sinh x )?
using of the standard library of sine is not allowed.
therefore im stucked at quite beginning.
anyone can help me please?
im doing this for my project.
thank lots...
|
|
|
|
|
I remember something like this:
sinh(x)=(e^x - e^-x)/2
Right?
Have a nice code day
|
|
|
|
|
It,s right. I checked it.
sinh(x)=(exp(x)-exp(-x))/2
cosh(x)=(exp(x)+exp(-x))/2
where x is in RAD !
Bye, bye
Have a nice code day
|
|
|
|
|
|
Calculator???? Toxcct is not out there! otherwise he'd have tasted your problem like honey!!:->
0x0400:
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|