|
Sorry, my fault.
Notebook - XP
pda - Windows Mobile 5
why that could be the reason?
|
|
|
|
|
I'm pretty sure that although SQL server will run on XP, it doesn't actually work.
Confirmation anyone?
|
|
|
|
|
I'm developing a small application witch scanning remote servers for TCP and UDP Ports (Open/Close).
About the TCP it's done.
But about UDP I’m facing a big problem with it .
I found a strategy I think it's helpful for that
By sending a UDP Message and receive ICMP server response but i don't know how to do this .
I need an answer ASAP or a code sample for how to do that.
Thanks.
|
|
|
|
|
Hello,
I am attempting to invoke the GetVersionVector method of the DfsrReplicatedFolderInfo on a remote machine.
After referring to two articles (1, 2) about the subject on InvokeMethod in C#, I have written the following code:
<br />
string TargetMachine = textBox2.Text;<br />
<br />
<br />
System.Management.ManagementScope oMs = new<br />
<br />
System.Management.ManagementScope("\\\\" + TargetMachine + "\\root\\microsoftdfs");<br />
oMs.Connect();<br />
<br />
System.Management.ObjectQuery oQuery = new System.Management.ObjectQuery("SELECT * FROM DfsrReplicatedFolderInfo");
<br />
ManagementObjectSearcher oSearcher = new<br />
<br />
ManagementObjectSearcher(oMs, oQuery);<br />
<br />
ManagementObjectCollection MgmtObject = oSearcher.Get();<br />
<br />
<br />
foreach (ManagementObject item in MgmtObject)<br />
{<br />
<br />
<br />
<br />
ManagementObject outParams = (ManagementObject)item.InvokeMethod("GetVersionVector", null);<br />
<br />
MessageBox.Show(outParams.ToString());<br />
}<br />
When attempting to InvokeMethod, the following error is thrown:
Object reference not set to an instance of an object.
If I do away with the cast and use declare outParams as an object instead, i get the same error.
Any input is appreciated,
Matt Brown
|
|
|
|
|
Here's the solution....
Tweak query as desired...
private void button7_Click(object sender, EventArgs e)
{
string TargetMachine = textBox2.Text;
ManagementPath path = new ManagementPath("\\\\" + TargetMachine + "\\root\\microsoftdfs");
ManagementScope scope = new ManagementScope(path);
SelectQuery msQuery = new SelectQuery("SELECT * FROM DfsrReplicatedFolderInfo");
ManagementObjectSearcher searchProcedure = new ManagementObjectSearcher(scope, msQuery);
object[] methodArgs = { "" };
foreach (ManagementObject item in searchProcedure.Get())
{
try
{
item.InvokeMethod("GetVersionVector", methodArgs);
foreach (string returned in methodArgs)
{
MessageBox.Show(returned.ToString());
}
}
catch (SystemException excep)
{
MessageBox.Show(excep.Message);
}
}
}
|
|
|
|
|
Hi,
what is the diffrent between synchronous and asynchronous communication in socket?
How can i handle many number of client in server using socket. can anybody provide some exaple f asynchronous communication in socket?
thankyou
YPKI
|
|
|
|
|
Synchronous: The sender will wait for a reply and not do anything else until that reply is sent
Asynchronous: The sender will be notified when a reply is received, and can perform other actions in the background
If you want to handle many different clients, then I'd personally use a collection of Sockets and hook them all up to the same event. In the event, look up the sender parameter to find out who sent what
|
|
|
|
|
can you please explain little more about handling multiple clients?
In my program each clients have numbet of functionalities like text chat,image sharing, presentation etc... all are handled using a listening port.. i feared that will all make the program struck or inefficient
How will be if number of port open for handle clients?
Thankyou
YPKI
|
|
|
|
|
Hi,
I am trying to work on an application that disables the close button (X) on the upper right hand corner of a window. In order to do that I need to use calls to API methods like GetSystemMenu, EnableMenuItem and RemoveMenu. I can figure out how these methods work but there are certain parameters that these methods have whose values that need to be passed to them as argument is unknown to me. How can I know them.
E.G.- for EnableMenuItem, the parameters are- hMenu (handle to the menu), uIDEnableItem (The menu item to be enabled, disabled, or grayed), uEnable (This parameter must be a combination of at least two of the following:
MF_BYCOMMAND or MF_BYPOSITION
MF_ENABLED, MF_DISABLED, or MF_GRAYED)
Now when I call this method from my application I supply the current window handle as the first argument, the item no. to be disabled/enabled as the second argument but I CAN'T UNDERSTAND WHAT TO SEND AS THE THIRD ARGUMENT. What exactly are the possible values for those parameters- MF_BYCOMMAND or MF_DISABLED. I checked certain examples where they are supplying hexadecimal values like &HF060, &H1, 0x400, 0x1000, 0x2 etc. or integer values like 1024, 2 etc. But how would I know what exactly these values are and when to use which value. The same problem arises in case of calling RemoveMenu method. If you know about any chart or tutorial that lists the values of these parameters then plz refer. Waiting for your help. Thanks.
|
|
|
|
|
These are all listed in the winuser.h (header file). Depending on the installation on your system you may already have it. If not, Google for that and you'll find loads of references.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
modified on Wednesday, April 15, 2009 11:38 AM
|
|
|
|
|
|
|
If you want the close box to be visible but inoperative (a silly idea if you ask me), then use the FormClosing event and set e.Cancel true. No native code needed whatsoever.
|
|
|
|
|
I used this functionality in an unrelated article[^]. It may be worth looking at the source.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
|
Hi Guys,
I would like to create Multiple parent node on may Page where the First Node is independent of the other Node.
Home
page1
page2
Services
page3
page4
Contact
page5
Page6
etc...
How can i create webconfig.sitemap file to have the above structure on a page?
Home service and Contact should be independent links not embebed under Home.
Many thanks
|
|
|
|
|
Try something like this:
<siteMap>
<siteMapNode title="Home" url="default.aspx">
<siteMapNode title="Page1" url="page1.aspx" />
<siteMapNode title="Page2" url="page2.aspx" />
</siteMapNode>
<siteMapNode title="Services" url="services.aspx">
<siteMapNode title="Page3" url="page3.aspx" />
<siteMapNode title="Page4" url="page4.aspx" />
</siteMapNode>
<siteMapNode title="Contact" url="contact.aspx">
<siteMapNode title="Page5" url="page5.aspx" />
<siteMapNode title="Page6" url="page6.aspx" />
</siteMapNode>
</siteMap>
You can add links to any node by placing them in between <siteMapNode></siteMapNode>. Those links will not be present or visible in your menu until you clink on the parent link. See how that works for you.
Josh
|
|
|
|
|
Many thanks.Its really much appreciated.
What i want is to have multiple parent link.So when you click on Home to will not hide service Link.
when you implement like you mentioned it comes with an error.
"Exactly one element is required directly inside the element".
Please advice.
Many thanks
|
|
|
|
|
That's what I get for trying to go from memory! You have to wrap everything in one <siteMapNode></siteMapNode> element. If you are using this with a SiteMapDatasource, you can change the ShowStartingNode property to false if necessary.
<siteMap>
<siteMapNode>
<siteMapNode title="Home" url="default.aspx">
<siteMapNode title="Page1" url="page1.aspx" />
<siteMapNode title="Page2" url="page2.aspx" />
</siteMapNode>
<siteMapNode title="Services" url="services.aspx">
<siteMapNode title="Page3" url="page3.aspx" />
<siteMapNode title="Page4" url="page4.aspx" />
</siteMapNode>
<siteMapNode title="Contact" url="contact.aspx">
<siteMapNode title="Page5" url="page5.aspx" />
<siteMapNode title="Page6" url="page6.aspx" />
</siteMapNode>
</siteMapNode>
</siteMap>
|
|
|
|
|
Many thanks.It works very well Now.
Thanks
|
|
|
|
|
Hello! I recently started writing my first Windows Service project in C#, and I'm at a point now where I have a lot of time to perfect things before I continue.
I was wondering what's considered generally "good practice" with regards to Windows Services. Specifically, the stopping mechanism.
When my service starts, it kicks off a few threads that perform some file manipulation. When the service stops, I want it to shut those threads down gracefully. Ideally, shutting down the service puts the file system in a state where the manipulation can be easily resumed upon restarting the service. So, when shutting down the service, I'd prefer to let one of the threads (if it's currently doing work) finish the works it's already started, but in some cases, this can take several minutes.
Is this considered bad practice, or is this something I shouldn't really be concerned with? Are there other things anyone thinks I should consider?
|
|
|
|
|
It sounds OK to me, though "several minutes" sounds excessive. Is there a way to have them stop after the current operation even though there are still other things to do?
agent00zelda wrote: it kicks off a few threads that perform some file manipulation
Can those be in their own Services?
|
|
|
|
|
Thank you for your response!!
PIEBALDconsult wrote: Can those be in their own Services?
Actually, yes, and they are.. I guess I should have mentioned that part
The way I had it implemented before I made the initial post was I pretty much let it finish everything until it was able to submit the data to the other services. But Windows spazzed out because it couldn't stop the main service until it finished the preceding operations.
What I ended up doing was defining like a project "state" DataTable that could be exported and imported again when the service restarts. Your suggestion was well-taken -- pretty much made the current operation finish and then updated the project state based on that. I don't know if using a DataTable is the best approach, but it seems to work much better, since it takes considerably less time to stop the service.
Still open to suggestions if you or anyone can think of a better approach, though!! I guess I'm in a C# experimentation phase
|
|
|
|
|
Hi folks,
I could please need some help with custom Configuration Sections:
Let me first describe what I want to acheive:
I want to have a Configuration section which consists of several items (I already managed that, it's working fine)
Now each of these items can should have another list of subsitems.
The resulting config file should look like this:
+ section
- parentitem
- childitem
- childitem
...
- parentitem
- childitem
...
As I said I already managed add the section and create the "parent items".
Now I tried using a ConfigurationElementCollection derived class for the collection of
"childitems" but they won't show up.
Does anyone have an idea how I can acheive my goal?
Many thanks in advance.
Stefan
|
|
|
|