|
Hello,
I am trying to find some examples and information on how to add COM to the C# application and connect to a COM server that was created with C++. Any help would be wonderful.
Thanks
|
|
|
|
|
|
Delete your garbage post. SUpport the site buy buying advertising space, like every other legitimate advertiser on the site.
|
|
|
|
|
Is there a way to programatically extract an crystal report into c# as an image object?
|
|
|
|
|
AFAIK no. However you can export the document to Excel, PDF, HTML etc.
The need to optimize rises from a bad design
|
|
|
|
|
Hello all:
I am having a problem with a Windows Service that I'm writing in C# using Studio 2003. The main service will start fine, but for some reason the OnStart() and OnStop() methods in the additional service never fire on their own. As a workaround, in the second service I added a line to the InitializeComponent() method to call OnStart() since the Initialize method is actually called. This works as a workaround to get the service doing what it should, but then the OnStop() is never used and this seems a little odd to me. It does work this way, but I can't believe this is how it should be and I would like to have it running right. If you have any ideas, any help would be appreciated.
Main Method in first service:
static void Main()
{
System.ServiceProcess.ServiceBase[] ServicesToRun;
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new MendsInterface(), new MendsToAllscripts()};
System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}
Initialize Method in the second service:
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.ServiceName = "MendsToAllscripts";
_common.LogMessage("Initializing Allscript service");
OnStart(null);
}
Thank you!
|
|
|
|
|
Brett G wrote: I added a line to the InitializeComponent() method to call OnStart()
That's no good. OnStart() is meant to be called in response to
the service control manager.
Brett G wrote: The main service will start fine, but for some reason the OnStart() and OnStop() methods in the additional service never fire on their own
How are you starting the additional services? If you're not getting
OnStart/OnStop calls then the service hasn't started.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Just realized that I only had one service installer set up. Added a second installer for the other service and things are running much better now. Thanks!
|
|
|
|
|
Thanks for the update!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have a file whose content like this :
1 2
3 4
I wonder how can I read them to 4 variables a, b, c, d
I tried using Read or ReadLine to read but there was no result
Would you mind helping me ?
|
|
|
|
|
Use a StreamReader[^] to read each line.
Put each line into a String variable.
Call theLine.Split(' '); on the string passing a space as the delimiter. This will give you an array of the values.
Loop through the array and use int.TryParse(...) to convert each string in the array into an integer.
Simon
|
|
|
|
|
I second that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Alternatively, you can also use a regular expression on each line, it would look like this:
^(\d+)\s+(\d+)
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi All,
I have an application that needs to send some basic text back to a console on another pc at another site via the internet.
The apps at both ends do just what they need to, but i have no idea how i should be sending the data.
Any ideas would be gratefully received!
Thanks,
Phil
|
|
|
|
|
ph1l2 wrote: but i have no idea how i should be sending the data.
Any ideas would be gratefully received!
check this out[^]
led mike
|
|
|
|
|
I was wondering how to do this too. I know at an abstract level that sockets (IP address + port number) can be used. But I'm missing the details on how get it set up and working.
|
|
|
|
|
Alan Balkany wrote: But I'm missing the details on how get it set up and working.
Try this site[^]. It has been around since the mid 90's.
led mike
|
|
|
|
|
|
Great, thank you for your help led mike
|
|
|
|
|
Hai all,
In my application, I need to Export webpage things into hard drive. I am using gridview, and i export all things(with the help of some sites) into excel except images.
Please, Can any one tell me how to export all contents of(Including Images) gridview into excel.
Thanks in advance..
Sham
|
|
|
|
|
Hello,
there is a webservice method which accept a data object as parameter, defined in the wsdl.
when i create new class and inherit from the webservice object and pass it to the method i get an internal exception:
"there is an error while generating xml"
it is possible, maybe with [attributes] to solve this problem? i would like to encapsulate the data class.
|
|
|
|
|
When you add a web reference, it creates client side classes for it. Check the source of the generated class to see what it needs to be serialisable as xml.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I tryed ssis just because my database is not normalized it does,t work. so I wrote a program. but have problems. The soft where creates an intermediate database to migrate an Access Database to with allow all null values. Then I have to migrate from the intermediate database to my real database because it does not allow null values it crashes. So I wrote so it will ignore null values. So cool that works now I am having problems because my real database have example( contact table) ( 25 column names) intermediate database (contact table) (10 column names) because the table are different in the number columns names I getting errors where the columns don't exist. I would like to have my code do something to the effect of
if objectcolumen exist() update else goto next, or skip, is this possible and if so can you give me example.
Learning to Code
|
|
|
|
|
how to convert WMA,AAC or FLAC to PCM(WAV) in C# compact framework or C# windows appln.
I saw examples given on codeproj. but most r not working with compact framework...(such as dll problems etc).
Can anyone give the direction for this?
|
|
|
|
|
I would assume you need to use an audio library to do things like this.
Find an audio library that supports .net and the conversions you want to do, then use that.
(Perhaps post the link to the article you are following)
Simon
|
|
|
|