|
As a rule, its advisable to release com objects from managed code.
|
|
|
|
|
|
Hi...
I am using the following code to discover remote devices..using the UUID specified by the OBEX Specification..
But the devices are not being discovered..
Am i missing any other thread?
Thanks in advance...
private bool OBEXOpenStream(string BTMAC)
{
Guid spguid = new Guid("{(uuid128=F9EC7BC4-953C-11D2-984E-525400DC9E09)}");
btaddress = OpenNETCF.Net.BluetoothAddress.Parse(BTMAC);
client = new OpenNETCF.Net.Sockets.BluetoothClient();
endpoint = new OpenNETCF.Net.BluetoothEndPoint(btaddress, spguid);
try
{
client.Connect(endpoint);
}
catch (System.Exception e)
{
return false;
}
stream = client.GetStream();
return true;
}
modified 26-Apr-12 1:27am.
|
|
|
|
|
hello friends,
In my educational period i was study about what is oops(object, class,inheritance,polymorphism,encapsulation and etc) as a theory with simple example,but after now a days i need to create my own classes,but still i am confused at this level,please tell me which way is better to understand and coding with my own way.please refer me any best articles for these topics
|
|
|
|
|
See this[^] article for starters.
/ravi
|
|
|
|
|
|
MP3 Rearrange is a good example of Object Oriented programming. It uses inheritance 5 levels deep. Overriding methods of base classes is used as well.
Take a look.
MP3 Rearrange
Please leave a comment if you like.
Best John
|
|
|
|
|
Short answer: Classes are nouns and their methods are verbs.
Each class maintains its data, and its methods represent actions on that data.
Ideally, once you write a class (and methods) you use it in the rest of your program like that type was built into the language. The only way the rest of the program interacts with it is through its public methods.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
|
|
|
|
|
baskaran chellasamy wrote: need to create my own classes,but still i am confused at this level,please tell me which way is better to understand
It is possible that you just need to start writing some code. Reading about programming can only get you so far - at some point you must actually do it.
|
|
|
|
|
Hi,
How can i retrieve the information about the hardware and services, for a particular client by specifying the computer name or ip address, which is connected in a LAN Network.
Regards,
Nemichand.
|
|
|
|
|
In the System.Management namespace you'll find ManagementObject and related classes that access the "Windows Management Instrumentation " subsystem. I suggest you read up on them and look at some of the examples.
|
|
|
|
|
Hi,
I have this simple Excel add-in project based on the standard VS template, however, I cannot call the below test() function from Excel VBA.
[Guid("9E88FA9A-4E7D-4bba-8D94-439BFA2B0AEC")]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public class MyFunctions
{
public void test()
{
Microsoft.Office.Interop.Excel.Application xlsApp = new ApplicationClass();
Worksheet ws = (Worksheet)xlsApp.ActiveSheet;
ws.Cells[1, 1] = "Edited by C#";
}
Please help,
Thanks.
|
|
|
|
|
Please state why you can't call the function. Any error message?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hello to everyone!
I have an ip Camera and I've created an application to display the image there. But I want to be able to control the camera motion from my application. For example, I want to move the camera up, down, right, left, using buttons. How can this be done?
I have read the manual of camera and i have understand that to move the camera should I use the command:
192.168.1.xxxx:xx/decoder_control.cgi?command=[command] (command = 0,1,2,3,4,5)
Can I control the camera using the C#?
Thanks!
|
|
|
|
|
Synodiporos wrote: should I use the command
Sure if that is the command you need to use. How are we supposed to know?
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
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Yes, this command is correct! for example if I put the command in the address bar of my browser, the camera starts to moving up.
The problem is that I do not know how to do this with C# for my application?
|
|
|
|
|
Synodiporos wrote: how to do this with C# for my application
Again, how are we supposed to know? All you have said is that you have a camera and want to control it. We have absolutely no idea what camera you have, how you are connecting to it, what code you are using or anything else. No one reading your post could possbily give you any sort of guidance.
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
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Ok! The model of my ip camera is EasyN CMOS Night View WIFI.
So according to this tutorial, i create an application that displays the image in my C# application. What I did not manage to do is to control the camera movement from my application...
What other information do you need?
|
|
|
|
|
.NET has an api for this, try the System.Net.WebRequest.Create( series of methods.
|
|
|
|
|
I tried to create an event but to no avail ...
private void Up_CButton_MouseDown(object sender, MouseEventArgs e)
{
string sourceURL = "http://192.168.1.xxxx:xx/decoder_control.cgi?command=0[&user=xxxx&pwd=xxxx]";
WebRequest req = (WebRequest)WebRequest.Create(sourceURL);
}
Is something wrong?
|
|
|
|
|
Please tell me you replaced the "xxx" stuff with the appropriate information, like the last byte of the IP address the camera is on, the port number that it's using, the username and password it's looking for...
|
|
|
|
|
Yes, the "xxx" replace the real information. All information that i use is correct.
for example if I put this command in the address bar of my browser, the camera starts to moving up. All these seems to be fine...
|
|
|
|
|
I assume you've logged in via the browser as well. What happens if you try this command in a fresh browser and you aren't logged in?
|
|
|
|
|
Yes, the new browser ask me username and password
Οκ, i changed the code but the camera still does not move ...
string sourceURL = "http://192.168.1.xxx:xx/decoder_control.cgi?command=0";
WebRequest req = (WebRequest)WebRequest.Create(sourceURL);
req.Credentials = new NetworkCredential("Username", "pass");
|
|
|
|
|
Are you actually sending the request though? WebRequest.Create just creates the request. It doesn't do anything with it.
|
|
|
|