|
spiritboy wrote: my modem is already connected to the internet
spiritboy wrote: another program that opened this port
What you are saying contradicts yourself. If the port is opened by another process then by definition something else opened the port. You cannot open an already opened port. If as you say your program has the port open, why don't you just start sending packets to it?
In other words, you are trying to open a port you already have open when there is no need to open it again.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
I am sorry for this,
again! i said my modem is connected to the internet!!! when it is connected to internet i can not Open its port since it is connected to the internet, i am not trying to open port for second time! all i need is to send packets over dialup.
more explanation: when i go to StartMenu\Connect to\My dial up Connection\Dial then i can not Open the modem Port. i do not have a second program running and using the port. the process that is using the port is one of windows processes.
i did not contradict myself, i said:
while modem is connected (by StartMenu\Connect to\My dial up Connection\Dial) i want to send packets!
the way i found is to use serial port, but while my modem is connected i cannot Open its port in my program unless , myself in the program dial and connect to the ISP.(not using StartMenu\Connect to\My dial up Connection\Dial)
|
|
|
|
|
spiritboy wrote: i did not contradict myself
Sorry, whether you realize it or not, you are contradicting yourself.
You say:
spiritboy wrote: i am not trying to open port for second time
and then:
spiritboy wrote: the process that is using the port is one of windows processes.
So slowly. The reason that you cannot open the serial port the second time is because you already have it open with another program! That is what the other process is! If you want to open the serial port again, you have to shut down the other program, process or alien intelligence that is using it first. Whether you started the process or Windows started the process does not matter at all. You can only have the serial port open by one process at a time.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
I am working with ActiveX Controls for a 3D App. The interface dll's come in 2 flavors,
a lite version that works without a license and a full version. Both dll's include the same
types just that some are disabled in the lite version. I would like to be able to reference
either dll for the same classes and methods depending on whether or not the user has a license
available. I have tried overriding a using alias and using directives with abstracts to get it to work but
have not been successful. Is there any way to do this without duplicating the Classes and methods
with their respective usings?
Thanks,
|
|
|
|
|
I know the how it would be done in .NET dll file, but not in activeX.
Maybe atribute dllimport would help. Here is some reference:
Using Unmanaged code and assembler in C#[^]
I would done in a way that there would be one ActiveX dll, and that dll would check the licence and would return to the application if it is using license or not.
|
|
|
|
|
Thanks Saksida,
The dll's are managed.
I had started looking into loading the dll's as assemblies but was not sure
how to make it work, If I have to reference each type individually then I think
it would be less work to just copy the Classes for each case.
|
|
|
|
|
If it is managed then look into Activator.CreateInstance()
This is a good article for using Activator: Plug-ins in C#[^]
Also i got this message in the email:
The dll's are managed, they are VB6 originally I believe.
VB6 application doesn't use .Net Framework. This is the VB version prior .NET framework versions
|
|
|
|
|
Sorry, should have typed VB.net (or at least explained my edit)
the Activator.CreateInstance() looks interesting, thanks for the heads up.
|
|
|
|
|
Hi
I need to create a program that searches the internet for all Ecommerce websites in South Africa.
So i made a web crawler to search through web pages by using there text to search for keywords on ecommerce and location.
Unfortunatley when using HttpRequest and HttpResponse on a google search, its retieves all the html but not the google search links.
Why is this? Is there a better way to do this? Any input would really help.
Thank you for your time.
Kindly Rian
|
|
|
|
|
XboxMedz wrote: Unfortunatley when using HttpRequest and HttpResponse on a google search, its retieves all the html but not the google search links.
Why is this?
It might be inserted dynamic, arriving over the internet some seconds after you have saved the HTML-page that contains the results. It could also be a means of protecting their search-results. To check which one it is, you'd have to save a second or two later.
You might be interested in a Google Custom Search Engine[^]. Not only does it crawl where you want, it also delivers its results as XML
I are Troll
|
|
|
|
|
Thanks Troll, i added a 500ms delay and it worked!
Ur the bomb!
Gonna check out that google custom search thing.
Thx for your help
(always helps to ask the smart guys)
|
|
|
|
|
Glad I could help
|
|
|
|
|
Hi
Usually, I generate classes from XSDschema and include those class files in my project. But I am trying to understand how to generate those classes for WCF service.
The issue is related to all those attributes (like DataContract, DataMember etc.) which DataContact needs. Regular xsd to C# code generation tools like XSD.exe don’t have provision of putting those attributes.
Are there other tools out there which can be used to create DataContract from xsd? Please advice. Thanks
Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Hey,
I'm searching for a site that has a collection of math algorithms written in C#. For example a function/class/whatev to calculate integrals.
The reason I'm looking for this is that I'm having problems understanding these things thoroughly from math lessons. The main reason for this is cause the notation sucks - hard. (So I'm looking for code that does not have variables named x1, y2, deletaOmegaPsi or likewise dumb ones.)
The math areas important for me here are calculus and trigonometry.
Does anyone know of such a site?
Cheers!
Jeroen De Dauw.
Jeroen De Dauw
---
Forums ; Blog ; Wiki
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:26am.
|
|
|
|
|
Hey,
That's a very interesting lib! Can't find any integral calculation in it though. And no goniometry.
Anybody know other, similar libs out there?
Cheers!
Jeroen De Dauw
---
Forums ; Blog ; Wiki
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
Hi to all,
Does any one know
how to move Mailbox items to other own folder programatically using exchange server 2007?
if any one knows please update me.
Regards
Balu
|
|
|
|
|
You can certainly do it using Exchange Web Service - a bit cumbersome but straight forward. Google for Exchange Web Service or EWS
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hi
in C language we use ellipses for unlimited arguments
is it possible in C#
|
|
|
|
|
Yap, you can do it this way
public static void SuperCoolMethod(params int[] list)
{
}
...
SuperCoolMethod(1,2,3,4,5);
|
|
|
|
|
AFAIK no. You can use a List instead.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
have a look at the params keyword.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
i copy this code from an article which is use to take a run time parameters when i run it,it show an error "String doesnot have a definition for ApplycurrentValues" i think i miss a directive for it plz help as i m novice in crystal report reporting. i use only one directive which is
using CrystalDecisions.Shared;
ParameterValues ParamCurrentValues = new ParameterValues();
ParameterRangeValue p_OrderDate_Value = new ParameterRangeValue();
p_OrderDate_Value.StartValue = this.txtOrderDateFrom.Text;
p_OrderDate_Value.EndValue = this.txtOrderDateTo.Text;
ParamCurrentValues.Add(p_OrderDate_Value);
rep.DataDefinition.ParameterFields();
("Date1").ApplyCurrentValues(ParamCurrentValues);
|
|
|
|
|
The code you have copy-and-pasted is almost certainly wrong.
I don't know the 1st thing about Crystal Reports (thank higher-being of your choice), but a quick search on the web brought up this (which is similar to your code)
public void SetParameter(string name, object value)
{
CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition parameter = _reportDocument.DataDefinition.ParameterFields[name];
CrystalDecisions.Shared.ParameterValues currentValues = parameter.CurrentValues; currentValues.Clear();
CrystalDecisions.Shared.ParameterDiscreteValue newValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
newValue.Value = value;
currentValues.Add(newValue);
parameter.ApplyCurrentValues(currentValues);
}
So it looks like ApplyCurrentValues is a method on the parameter.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|