|
Its not a web application but thank you for the response
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
I haven't used UPnPLib, but it the solution to your problem may lie in changing the value of the SubDefaultTimeout key in HKLM\COMM\UPnP . See this[^] MSDN link.
If this solves your problem, please consider donating 30GBP to a charity of your choice.
/ravi
|
|
|
|
|
This is for Microsoft Windows CE .NET 4.2.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
|
That's original.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
MicealG wrote: Freedom is the right to say that 2+2=5
You know what this pretty much sums you up. You do indeed have the right to say anything you want... the problem is saying some things just makes you look stupid.
Now go search for a way to set the timeout property for the microsoft UPNP library. If its possible, which id guess it is, then the answer will be out there somewhere.
|
|
|
|
|
I have spent days looking for the answer but I haven't been able to find one, it's not like I decided to come on the forum and offer money in exchange for an answer.
I'll make you a better offer, since you seem like a wise guy I will give you 100GBP if you find the answer and you have my guarantee of that!
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
No, no you have this the wrong way round. The way consultancy works is that you pay me and then i give you the answer. After all what guarantee do I have that if I posted the answer here that you would pay me? What if the answer is that there is no answer (ie. its not possible) - would you still pay me?
So, i'll do the work for £100 with pleasure (it'll only take me 10-15 minutes to confirm or deny the existance of a timeout property) and thats a better hourly rate than mine by a few times.
So let me know if you want to employ my company (I am a consultant in SE England). I don't accept paypal and I do charge VAT so I'll invoice you for the work and get started just as soon as the cheque/bank transfer clears.
|
|
|
|
|
Just as I thought a "Forum Tough Guy" who can talk the talk but yet he's a paraplegic.
Just one question though, what exactly is your problem? And if you can't help then why are you bothering me?
Lol.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
MicealG wrote: Just as I thought a "Forum Tough Guy" who can talk the talk but yet he's a paraplegic.
Ive been developing sofware for around 8 years commercially and maybe 2 years as a hobbyist before that. Im far from knowing everything, but I do know how to search for solutions - its what I do on a daily basis. Its part of this job.
MicealG wrote: Just one question though, what exactly is your problem?
My problem is you. Specifically you have <50 posts at CP and you come here and dictate how you think we should conduct ourselves. You also insult us by saying that our freely given help and advice is not good enough for you - you want a level of service above everyone else.
Your behviour is akin to a child not getting their own way. You can be assured that none of your questions will be ever be answered by me.
|
|
|
|
|
I didn't ask for your life story or even a slight insight into it, lol, but now that you have I must admit it does sound pretty depressing, you have my sympathy.
I'm sure your probably the "big cheese" when it comes to posting and congratulations on that I'm sure your mother is very proud.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
The votes speak for themselves kiddo.
|
|
|
|
|
Hi,
I've built a web service with an ASPX page as a test harness. My web service has a method which gets a DateTime object from an external application and displays it correctly.
I have a console application which makes a call to the same web service. When it calls the same web method as the test harness, the DateTime object is one hour out.
Can anyone suggest what the problem might be? Is it something to do with summer time?
Thanks 
|
|
|
|
|
Just a quick question...Have been trying to figure this out for the past 30 minutes but with no luck. Figured I'll just post in here for help.
How exactly do you get the contents of the item selected in the Drop Down List? Here's the code:
lblResult.Text = ddlBackgroundColor.SelectedItem.Text;
However I am getting a blank lblResult everytime. I am just baffled where did I miss. Grrr....
Anyway advice is greatly appreciated. Thank you.
|
|
|
|
|
Where are you populating the Drop downlist ?
the items are static one or dynamically you are adding ?
try to debug the application
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi, thanks for the reply.
I am not sure what does populating mean, but all I did was open a form, dragged the Drop Down List, Button, and Label to the form.
I added a few items to the DDL, via the "items" properties. They were all hard coded beforehand, so I would assume they are static.
I am just trying to get the label to show what was chosen by the click of the button.
Thanks
|
|
|
|
|
ok try to debug(F5) your application by putting debug point where you have written the code ...... and see dropdown list contains all the values
Assuming that you know how to debug and the code that you have written is in button click event
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hello,
I'm new to C#, so please bear with me if the question is obvious and/or stupid.
I have a C# (.NET Framework 2.0) application that needs to call functions in an unmanaged C/C++ DLL. The name of the DLL is unknown at compile time (so I can't use the DllImportAttribute directly). The solution I adopted uses the native LoadLibrary/GetProcAddress combination, as seen in the code snippet below.
using System;
using System.Runtime.InteropServices;
namespace Simple
{
class DLLPlugin
{
[DllImport("kernel32", EntryPoint = "LoadLibrary")]
private static extern IntPtr LoadLibrary(string lpLibFileName);
[DllImport("kernel32", EntryPoint = "GetProcAddress", SetLastError = true)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
[DllImport("kernel32", EntryPoint = "FreeLibrary", SetLastError = true)]
private static extern bool FreeLibrary(IntPtr hModule);
public delegate void VoidVoidDelegate();
private VoidVoidDelegate RunDelegate;
private IntPtr moduleRef;
public DLLPlugin(string dllName)
{
moduleRef = LoadLibrary(dllName);
IntPtr pfn = GetProcAddress(moduleRef, "Run");
RunDelegate = (VoidVoidDelegate)
Marshal.GetDelegateForFunctionPointer(pfn, typeof(VoidVoidDelegate));
}
~DLLPlugin()
{
FreeLibrary(moduleRef);
}
public void Run()
{
RunDelegate();
}
}
}
In the code you'll see that I declared a delegate,
public delegate void VoidVoidDelegate();
private VoidVoidDelegate RunDelegate;
and then used it in the constructor to store the function I'm going to call in the DLL. In order to do that, I had to use the delegate type twice: once as a parameter for GetDelegateForFunctionPointer and then again to cast the return value.
Now, this example calls a function named Run that receives no arguments and returns nothing (void), as specified by the delegate signature.
Now, my problem is that I don't know this signature at compile time. Maybe the first time it runs, the Run function will receive two strings and return a bool. Or maybe it will receive a string, two bools, an int and return a double. Or maybe something else.
What I need is to supply the return and argument types, and then create at runtime the right kind of delegate to use. I would then use this delegate created at runtime to supply the correct signature to the GetDelegateForFunctionPointer method and to correctly cast the return value. Not to mention to call my function in the DLL, of course.
If someone has any suggestions, I'd greatly appreciate the help. Code examples as well to illustrate, since I'm not at all familiar with using Reflection.Emit (I'm assuming it's going to go that way?).
|
|
|
|
|
The code below should do what you want, but I have not tested it. The core code comes from here[^].
<br />
AssemblyName assembly = new AssemblyName();<br />
assembly.Version = new Version(1, 0, 0, 0);<br />
assembly.Name = "ReflectionEmitDelegateTest";<br />
<br />
AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(assembly,<br />
AssemblyBuilderAccess.Run);<br />
<br />
ModuleBuilder modbuilder = assemblyBuilder.DefineDynamicModule("MyModule", true);<br />
<br />
TypeBuilder typeBuilder = modbuilder.DefineType("MyDelegateType",<br />
TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed |<br />
TypeAttributes.AnsiClass | TypeAttributes.AutoClass,<br />
typeof(MulticastDelegate));<br />
<br />
ConstructorBuilder constructorBuilder = typeBuilder.DefineConstructor(MethodAttributes.RTSpecialName |<br />
MethodAttributes.HideBySig | MethodAttributes.Public,<br />
CallingConventions.Standard,<br />
new Type[] { typeof(object), typeof(System.IntPtr) });<br />
constructorBuilder.SetImplementationFlags(MethodImplAttributes.Runtime | MethodImplAttributes.Managed);<br />
<br />
Type[] paramTypes = new Type[2];<br />
paramTypes[0] = typeof(Int32);<br />
paramTypes[1] = typeof(String);<br />
<br />
MethodBuilder methodBuilder = typeBuilder.DefineMethod("Invoke",<br />
MethodAttributes.Public | MethodAttributes.HideBySig |<br />
MethodAttributes.NewSlot | MethodAttributes.Virtual,<br />
typeof(Int32),<br />
paramTypes);<br />
methodBuilder.SetImplementationFlags(MethodImplAttributes.Runtime | MethodImplAttributes.Managed);<br />
<br />
Type type = typeBuilder.CreateType();<br />
<br />
Delegate del = Marshal.GetDelegateForFunctionPointer(pfn, type);<br />
del.DynamicInvoke(1, "2");<br />
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
It works! It's exactly what I needed. Thanks a lot for your help, I greatly appreciate it.
|
|
|
|
|
Help!
I have been using the dotNet Framework to create an UPnP Control Point application, this application makes use of the Microsoft UPNPLib.
The problem I have is when I "Invoke an Action", because the UPnP device that I am invoking the action on is building up a big response that could take a while to be received by my application the action keeps timing out (at around 36 seconds) is there anyway to extend the timeout period?
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Hi,
I have to compare MS Word Documents ie., the original document is to be compared with the same document after some editing and the process should be able to show the changes made. Please help me. The code should be in C#
thanx,
Nitin.
Nitin Raj Bidkikar
Nitin Raj Bidkikar
|
|
|
|
|
You already posted this 12 minutes ago. Why repost so soon?
|
|
|
|
|
i made the question more clear...........your answer didnt help.....got any other solution
Nitin Raj Bidkikar
|
|
|
|
|
Well there are probably libraries around that you can buy that will do this. There possibly code around for free, have you even tried searching? When you post here you should have atleast had a look around for something.
Assuming that you had searched I was fairly sure there wasn't going to be any free libraries which leaves you with the option of making your own ... which is why I gave the reply I did.
|
|
|
|