|
the follwing code compiled no problem and i make an conclusion that WMEncoder is a class instead of an interface.
WMEncoder e = new WMEncoder();//Yahoo!No problem at all!
when i try to make a derived class from WMEncoder (this is because i want to call the Finalize method explicitly):
-----------------------------------------------------------
using System;
using WMEncoderLib;
namespace GOWatch
{
///
/// Summary description for WMEncoderEX.
///
public class WMEncoderEX : WMEncoder
{
public WMEncoderEX()
{
//
// TODO: Add constructor logic here
//
}
}
}
-----------------------------------------------------------
i get 95 lines of similar error
d:\documents and settings\administrator\my documents\visual studio projects\gowatch\wmencoderex.cs(9,15): error CS0535: 'GOWatch.WMEncoderEX' does not implement interface member 'WMEncoderLib.IWMEncoder2.SetLocaleID(int)'
isn't that WMEncoder is already a class instead of interface? why i am still forced to implement interface WMEncoderLib.IWMEncoder2 members?
thank you.
regards
yccheok
|
|
|
|
|
yccheok wrote:
the follwing code compiled no problem and i make an conclusion that WMEncoder is a class instead of an interface.
WMEncoder e = new WMEncoder();//Yahoo!No problem at all!
This is one of my problems with C#, or at least it's compiler, while this may be a valid statement when dealing with C++, C# allow value types to make this same declaration, for example:
<font color="green">
struct Val
{
int X;
}
<font color="green">
Val v = new Val();
<font color="green">
Console.Write(v.X.ToString());
I really don't know about WMEncoder , however you may be dealing with something else.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Ok, I'm not sure of this could be the problem, but may be you would have to implement a set of interfaces on your derived class (by simply calling the base class methods or with your own implementation).
Cheers
Kannan
|
|
|
|
|
simple question for the jedi -
I always thought that protected internal combined the access modifiers into protected (only in inheritance heirarchy) and internal (only in project).
Apparently it is an either-or however: protected internal means both inheritance heirarchy or within project.
My question is *why*. Can anyone think of a good example where this might be useful?
Thanks in advance -
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
The difference:
internal
Accessible only by methods in the defining assembly.
protected internal
Accessible only by the methods in this type, any derived type, or any type defined in the defining assembly.
This is directly from Applied .NET Framework Programming by Jeffery Richter, essentially protected internal give you more latititude when creating assemblies that provide extensibility through inheritance.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
I've been trying to teach myself C# and web related programming with the beta version of Microsoft Visual Studio 7.0. I've tried to use the web controls but when I try and execute a simple example, the control does not appear in the browser (labels show up but buttons, etc do not). Any suggestions? I have a feeling it's a configuration problem (with IIS, browser, or something else).
Any help or suggestions appreciated.
Joe
|
|
|
|
|
Are you remembering to include the runat="server" attribute? in the asp:Button tag?
|
|
|
|
|
It shows runat="server" in the HTML section. Is there another location that this needs to go?
Any other thoughts?
Joe
|
|
|
|
|
who to get window directory path programatically?
r00d0034@yahoo.com
|
|
|
|
|
Look at System.Environment
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
Try this:
FileInfo file = new FileInfo(Environment.CurrentDirectory);
all the best,
=====================
http://wasp.elcat.kg
|
|
|
|
|
i want to start a Process
whose path is on network say
\\imran1\folder1\folder2\some.exe
where imran1 is computer name but when i create an object of Process and called its start method
it did not start the process whoes path is at network only ((i.e path)\\imran1\folder1\folder2\some.exe)
but it sucessfully start the process at local drive and also on those drives that are mapped for network path.
but THE requirement of my application is the common path for each computer of the network
i am using xp prof.i have full permission and if i run this exe manually it execute sucessfully.
i am putting this question second time (one person(thanks for him) has give me the idea of map network drive but could not tell the reason for that)
can any body solve my problem?
r00d0034@yahoo.com
|
|
|
|
|
I'm not entirely clear on what you are trying to do here, but I suspect that you want this process to run in the other box, not in your local box. I also suspect that when the target exe was on a mapped drive, it ran in your box, rather than on the remote node. If my guesses are correct, then this is not something you can accomplish with a local process object in your box. You will, instead need to use remoting (see the help on System.Remoting namespace). This is a bit more complicated, because what you are describing makes yourr machine the 'client' and all others the 'server' in a remoting scenario. this means you would need some always running 'listener' task on all the remote machines to provide a tcp or udp reciever for the 'run' command, the 'listener' would actually create the process object and start the target.
If you really just want a local process that was started by loading the executable located on the remote computer into local memory, then you would at least have to share the folder on the remote machine, and at least temporarily (net use or the equivalent API call) map it.
If none of this makes sense, then perhaps If you provided some more detail on exactly what you are trying to do and the rational for the "same path" requirement...
R
|
|
|
|
|
It's okay Rob. Imran has never fully explained his problems or fully understood explanations and answers. I have learned to give short hints and let him figure it out from there. I would seriously advise you to do the same. You can see the post in my personal forum and follow the link to see what I mean.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
Thanks Dave, I see what you mean...
|
|
|
|
|
OldROB says
If you really just want a local process that was started by loading the executable located on the remote computer into local memory, then you would at least have to share the folder on the remote machine, and at least temporarily (net use or the equivalent API call) map it.
first of let me say you thanks alot for your ans.
yes i just want a local process that should start by loading the executable located on the remote computer into local memory.
yes i have shared it.but still it did not start.
but i could not understand what do you mean by this sentance of yours.
----------------------------------------------------------
at least temporarily (net use or the equivalent API call) map it.
----------------------------------------------------------
i hope you will be able to ans this.
can you tell me how i will programatically map a network drive for a perticuler folder(it may be local or at network place) ?
r00d0034@yahoo.com
|
|
|
|
|
|
|
Thomas George wrote:
In other words, can delegates be stored in a container and iterated?
Yes Here's some code I did in a number solving program:
public NumberSolver(int result, ArrayList numbers)
{
this.result = result;
this.numbers = numbers;
functions = new ArrayList();
functions.Add( new FunctionHandler( this.Add ));
functions.Add( new FunctionHandler( this.Subtract ));
functions.Add( new FunctionHandler( this.Multiply ));
functions.Add( new FunctionHandler( this.Divide ));
functions.Add( new FunctionHandler( this.Power ));
}
...
public delegate int FunctionHandler(int a, int b);
...
int output = numbers[0];
for (int i = 0; i < functions.Count; i++)
{
FunctionHandler func = (FunctionHandler) functions[i];
output = func(output, numbers[i + 1]);
}
return output;
Not sure if this is what you meant, but hope it helps
DBHelper - SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
|
|
|
|
|
|
|
is there a way to do this from inside VS? I know how to do it from the command line:
<br />
csc /doc:foo.xml test.cs<br />
but is there a way to do it from the IDE?
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
Project Properties -> Configuration Properties
Add an entry for XML Documentation File
|
|
|
|
|
Have you tried ndoc , its extremely cool.
Also there is a option in Tools menu
Tools --> Build Comment Web Pages
option which gives the documentation.
<edit> forgot the link , here it is http://ndoc.sourceforge.net/download.html[^]
Cheers
Kannan
|
|
|
|
|
Hi all,
I have created a Web Service that accesses an MS Access database that is located on another computer. My problem comes when I try to use IIS 'Integrated Windows authentication'.
When I access the web service locally ie "http://localhost/webservice/webservice.asmx" I get access to the web service and when I call a web method it can access the database fine.
However, when I access the web service with "http://xxx.xxx.xxx.xxx/webservice/webservice.asmx" correctly I get the Windows authentication dialog popup and have to enter a valid user id, password, and domain to get access to the web service. But when I attempt to invoke a web method I get an error on trying to connect to the database with the following message:
Microsoft JET Database Engine The Microsoft Jet database engine cannot open the file '\\xxx.xxx.xxx.xxx\directory\DB\DB1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
The problem is not that someone else is opening the DB but I believe under the windows authentication I am not getting the privelage to access the network.
Any ideas???
|
|
|
|