|
hi
it is obvious that i update reference by rightClick the webReference, rebuild webservice,client and any things i thought
and i didnt wrote a designer .
|
|
|
|
|
WDI, I'm responding to your e-mail back in the forum.
WDI wrote:
Hi
this is exact problem.
when i add webmethod to webservice and build it and update
client webreference, client knows the new webmethod without any problem.
but when i add a new class to webservice project and build it and update client webreference, client doesnt know the new class.
Note:this is a new problem and a few days ago when i added
a new class to webservice client could knows new class.
this problem is for new solutions too.
If you added a new web service class by putting it into a new ASMX file, then that's a separate web reference. You'll need to add it to the client project as a new web reference.
If you added a new web service class to the existing ASMX file, then it won't be visible to the world. You can only have one web service class in each ASMX file. Your project will still build if you do this, but only the first class will be exposed in the WSDL.
Hope this helps,
PatrickShane
|
|
|
|
|
Hi
no the class is a .cs file and not an ASMX file.
what should i do plz?
|
|
|
|
|
I am trying to figure out how to send emails through an exchange server but all I can find is information on how to send emails through SMTP servers. I heard whispers and hints that I should be using CDO but i don't really see any documentation on how to use exchange servers.
Suggestions anyone?
Thanks!
Jim
|
|
|
|
|
Ah, I finally found MAPI documentation but its in a different threading apartment then the stuff that I was previously doing! I need to be in a MTA for the code I am writing, so what do I do?
Cheers,
Jim
|
|
|
|
|
Hi,
I have an app in which I a render a number of DirectDraw surfaces on the screen. I want to capture this as a movie that I can play in PowerPoint. Please help me on this. I don't want to save the DDraw surfaces as jpg images and then create a movie using something like premiere bcos the images take up so much disk space.
sid
|
|
|
|
|
Hi
I've got this line:
<br />
Vector2* test = UnsafeNativeMethods.Vector2.Hermite(pOut, pPos, pTan, pPos2, pTan2, weight);
which should work I think, but it says:
The type or namespace name 'UnsafeNativeMethods' does not exist in the namespace 'Microsoft.DirectX' (are you missing an assembly reference?) C:\DXDev\CodeFile1.cs
I've loaded the microsoft.directx.dll version 1.0.900.0
Whats happening??
Thanks
|
|
|
|
|
It should work... I have a newer version though.
public static unsafe Vector2* Hermite(Vector2* pOut, Vector2* pPosition, Vector2* pTangent, Vector2* pPosition2, Vector2* pTangent2, float weightingFactor);
Declaring Type: Microsoft.DirectX.UnsafeNativeMethods+Vector2
Assembly: Microsoft.DirectX, Version=1.0.2902.0
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
This is about generating monochrome image from JPEG 24BPPRGB by dropping out background colors and making rest as black in GDI+...I have few shades of RGB values(specifying dropped out color).
I am developing Winform application which processes the scanned image then does the OCR on it, before that It needs to perform Color dropout on scanned image i.e. removing the background color of image so it won't interfere with the textual characters.....Color to be droppped out is specified by the user (they are the diffrent shades not the primary colors)..In addition I also wish to explore thresold function to select Pencil shades..Pls post the link if u find it would serve the purpose.
Any help regarding this would greatly be apprciated
regards.
MaulikCE
|
|
|
|
|
Why is it that an event, defined in a base class, can only be called from that class, and can't be called from a derived class?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Why not just use a protected virtual method to raise the event?
|
|
|
|
|
That's a good workaround , but he asked for the reason why this workaround is needed.
Why can a class inherit the methods, but not the events?
_________________________________
Vote '1' if you're too lazy for a discussion
|
|
|
|
|
For default compilation of events for C# and other managed languages, the event itself is private. See my reply to Marc.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Why can't you just call EventName(this, EventArgs.Empty) , for example? Partly due to a language limitation, which is because of how C# (and others) compiles events by default.
Take the following example, compiled as a DLL:
using System;
public class Test
{
public event EventHandler Foo;
protected virtual void OnFoo(EventArgs e)
{
if (Foo != null)
Foo(this, e);
}
} Now let's look at the IL generated for this simple class following the event guidelines:
.class public auto ansi beforefieldinit Test
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler Foo
.method public hidebysig specialname instance void
add_Foo(class [mscorlib]System.EventHandler 'value') cil managed synchronized
{
.maxstack 3
IL_0000: ldarg.0
IL_0001: ldarg.0
IL_0002: ldfld class [mscorlib]System.EventHandler Test::Foo
IL_0007: ldarg.1
IL_0008: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_000d: castclass [mscorlib]System.EventHandler
IL_0012: stfld class [mscorlib]System.EventHandler Test::Foo
IL_0017: ret
}
.method public hidebysig specialname instance void
remove_Foo(class [mscorlib]System.EventHandler 'value') cil managed synchronized
{
.maxstack 3
IL_0000: ldarg.0
IL_0001: ldarg.0
IL_0002: ldfld class [mscorlib]System.EventHandler Test::Foo
IL_0007: ldarg.1
IL_0008: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_000d: castclass [mscorlib]System.EventHandler
IL_0012: stfld class [mscorlib]System.EventHandler Test::Foo
IL_0017: ret
}
.method family hidebysig newslot virtual
instance void OnFoo(class [mscorlib]System.EventArgs e) cil managed
{
.maxstack 3
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler Test::Foo
IL_0006: brfalse.s IL_0015
IL_0008: ldarg.0
IL_0009: ldfld class [mscorlib]System.EventHandler Test::Foo
IL_000e: ldarg.0
IL_000f: ldarg.1
IL_0010: callvirt instance void [mscorlib]System.EventHandler::Invoke(object,
class [mscorlib]System.EventArgs)
IL_0015: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
.event [mscorlib]System.EventHandler Foo
{
.addon instance void Test::add_Foo(class [mscorlib]System.EventHandler)
.removeon instance void Test::remove_Foo(class [mscorlib]System.EventHandler)
}
} Notice that a private field Foo is defined as EventHandler . From a derived class, as you know, you can't access the private therefore you can't call Invoke on it, which invokes each of the combined delegates.
Some classes - like Windows Forms controls - store the EventHandler derivatives into the protected Control.Events , which you can get the combined delegate and invoke it yourself.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath Stewart wrote:
Partly due to a language limitation, which is because of how C# (and others) compiles events by default.
Is this a decision the compiler vendor can make, or is it part of the standard? Just curious.
And thank you very much for the response!
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Good question, and it's one I'm not sure about off the top of my head (damn you, Marc! ). Unfortunately, I don't have the time too look it up, but if you'd like to it'd be great to know.
I doubt it's a language issue, though. If anything it may be a CLI guidelines or even a rule, but if you were to write the class in IL (personally, I enjoy such pain and anguish) you could define the field as public or family (IL's "protected"). I did so, changed the name of the field (so I could access it in lieu of the public .event definition), and re-assembled it with ilasm.exe with no problems. Compiling the following driver app compiled and ran just fine with the expected output:
using System;
class Test2 : Test
{
static void Main()
{
Test2 t = new Test2();
t.Foo += new EventHandler(t.Test_Foo);
if (t.FooEvent != null)
t.FooEvent(t, EventArgs.Empty);
}
private void Test_Foo(object sender, EventArgs e)
{
Console.WriteLine("Hello, world!");
}
}
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi Marc
Remember an event is just a limited delegate. Now if u dont mind losing the pretty event icons, you can just expose delegate fields in your class directly. The usage will be exactly the same (both are 'multicast'), except that delegates allows to be nulled and assigned directly, where events cant.
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
How to get a number of row in column by using OleDbDataReader. thank
|
|
|
|
|
|
ahh sorry for my stupid question? I mean How do I get the number of rows. Thank.
|
|
|
|
|
Get the Count property of the DataTable.Rows property for the DataTable in the DataSet for which you want the count, like in the following example:
int count = dataSet1.Tables["MyTable"].Rows.Count; There is a lot of functionality defined for the DataSet class and related classes, so you'd best read the documentation[^], as well as Accessing Data with ADO.NET[^] in the .NET Framework SDK, which gives a great overview of ADO.NET as well as many examples, which are also included in some of the class library documetentation.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi
Does anyone knows how to Send a Hotkey using the WinApi?
I want to send CTRL-ALT-DELETE to an Remote Client.
I should use SendInput but I don't know how.
Can anyone help me????
Best Regards
|
|
|
|
|
You can't hook the remote keyboard, this has already been answered here[^].
|
|
|
|
|
You can't use SendInput on your machine to send keystrokes to a remote machine.
You CAN use it if the remote machine is running a server application that responds to request from a client application on your machine. You can put the SendInput code in the server app and execute it on some signal that you come up with and send using the client app.
But, then, Heath already told you this... If you need to figure out SendInput and C#, then Google for it! All you need to search for is "SendInput C#". Here[^], I've done it for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want get info from the Outlook Express inbox folder which is an .dbx-file. The problem is that some characters seem to be randomly converted to strange characters. Is it binary, unicode or what? How do I convert the .dbx file to plain text, like an .txt file.
/larbo204
www.nymax.nu
|
|
|
|