|
My problem is I want list of those user who logged in a domain.
when ever a user logged in i want to know.
i searched alot but i m not getting solution.
can anybody help me out.
It's very urgent.
|
|
|
|
|
I have a problem I have to work with an api provided by someone else, but the problem is that dll is throwing an exception and a stack trace which I have gotten around somehow but if the error happens I dont want the stack trace to be displayed. In order to do that successfully I want to catch that exception in my code but for some reason I cant, when I try to debug the app it starts showing assembler code.
Is there a solution?
OnlyHuman23
|
|
|
|
|
You mean that a try/catch block does not work?
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
The debugger intercepts the excpetion before it reaches your code. If you choose not to debug, the exception will reach your code.
A normal user doesn't have a debugger installed, so it won't happen when you distribute the application.
---
b { font-weight: normal; }
|
|
|
|
|
Even when I build the application in release the exception comming out of the dll code is thrown and is not caught in my try block.
OnlyHuman23
|
|
|
|
|
Have any bugs in the ErrorProvider control been discovered yet? I had a BIG problem the last time I tried using it. When you have a few controls on your form (textboxes, buttons, etc.) it works perfectly but when there are a large number of controls the control doesnt respond to calls. Anyone facing similar problems?
|
|
|
|
|
I've used it in a form with many controls and I have not had a single problem. I just always set it to never blink, because I hate the icons blinking out-of-sync.
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
I'm having a slight problem with the numeric UpDown control? I've done everyhing I can but that stupid control doesnt display itself in XP Style mode. What can I do to settle this? I'm developing this application professionally so I can't let it hamper my program. I found this[^] but it had quite a few bugs of its own.
|
|
|
|
|
If you search Google[^] you'll see that it just doesn't work for .NET 1.x.
In .NET 2.0 I've used NumericUpDown controls and it works as expected (same as TabControl s).
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
|
Hello Friedns,
I am tring to restore backup file which is on Machine1. And SQL server might be on anyother machine in local network.
I am using this Code:
==============================================================
//create an instance of a server class
SQLDMO._SQLServer srv = new SQLDMO.SQLServerClass();
//connect to the server
if(rbLocal.Checked==true)
srv.Connect(this.txtServName.Text,this.txtUserName.Text,this.txtPass.Text);
else
srv.Connect(this.cmbServList.Text,this.txtUserName.Text,this.txtPass.Text);
//create a restore class instance
SQLDMO.Restore res = new SQLDMO.RestoreClass();
//set the backup device = files property ( easy way )
res.Devices = res.Files;
//set the files property to the File Name text box
res.Files = "[" + System.IO.Path.GetTempPath()+"AlcoMateBlank.BAK" + "]";
//set the database to the chosen database
res.Database = this.txtDBName.Text;
// Restore the database
res.ReplaceDatabase = true;
res.SQLRestore(srv);
==============================================================
This code working properly if Backup file is on Local Machine but not if backup file is on another machine in a network. I am getting this error
BackupDiskFile::OpenMedia: Backup device 'C:\DOCUME~1\sachin\LOCALS~1\Temp\AlcoMateBlank.BAK' failed to open. Operating system error = 3(The system cannot find the path specified.).
Can you please suggest me eassy way of restoring database from remote PC to remote sql server which is in LAN?
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
Copy the file to the SQL Server machine first. Then tell the SQL Server where to find the file on it's own hard drive.
The problem with telling SQL Server where to find the file on a remote machine is that the account that is used to do the acctual restore most likely will not have permissions to the remote machine where the backup file is stored.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My problem is I want list of those user who logged in a domain.
when ever a user logged in i want to know.
i searched alot but i m not getting solution.
can anybody help me out.
It's very urgent.
|
|
|
|
|
There isn't a good solution for this. There is no event that says a user logged in.
You'd have to poll all the domain controllers in the domain and get the lastLoginTime (I think!) property for each user object. This is a very long operation and not practical in an environment of more than maybe 50 to 100 users. This property is NOT replicated to all replicas so there is no easy way to get this value. Also, there is no loggedOutTime property, so you can't tell when someone logs off either.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I'm using C# to develop a handbook app for PocketPC.
How can I make the datagrid have a blank row when the form just loads successful.
Thanks in advance,
Hung.
Hung
|
|
|
|
|
Is C# able to do what C/C++ can do?
C/C++ has a reputation of being powerful and complex. They are often used to write complex software like OS and games.
Does C# have the same capabilities as C or C++?(e.g Used to write OS) Most often, I have heard that C# is good to program with.
|
|
|
|
|
Yes.i think c# had most of c++ capabilities not all.you can do every thing in c# like c++ with easier role.
|
|
|
|
|
Hello,
In C# you cannot do everything that you can do with C++. Multiple inheritance is one thing and template meta programming is another. Not that these things are used on a daily basis...
It all comes down to the right tool for the right job. C++ for example is good for writing core parts of an OS due to it's nature in C. C# on the contrary is fantastic for writing pluggable architectures, database applications and web apps due to its simplicity and rich framework that is shipped with the compiler.
IMO C++ is good and C# is good. None is best, but one solves a particular problem better than the other. In short: the righ tool for the right job.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Does anybody knows AAC file format? I am looking for reading and writing TAG for AAC music tracks.
Also looking WMA.
Thanks in advance.
|
|
|
|
|
Hello,
1) I have a C# console application that currently is compiled and linked to an external C++ DLL file that contains unmanaged C++ code. This compiles and executes fine.
2) I would like to compile the C# application so that the C++ DLL is compiled into a single C# EXE application so that I no longer need to deliver the C++ DLL separately.
NOTE: My current files separately compiled files are:
C# EXE: POST2STK_Console.exe (size=20 KB)
C++ DLL: POST2STK_LIB.dll (size=41 KB)
I am trying to merge these together using ILMerge, but I keep running into the following issue:
If I compile with the following "Post-build Event Command Line" parameter set in my project's build properties as:
ilmerge /target:winexe /out:TEST.exe POST2STK_Console.exe POST2STK_LIB.dll /zeroPeKind
I do NOT get any compiler errors and get output of TEST.exe as a 25 KB size file. This makes no sense when the sum of orginal EXE and DLL files noted above = 61 KB. More importantly, if I try to run TEST.exe, I also get a runtime Exception "System.TypeLoadException" has occurred in TEST. Which from what I can tell is a result of the fact that the DLL was actually NOT compiled into the TEST executeable when ILMerge was run, even though there were no errors shown when this was done.
Anyone that can offer any assistance on how to get this to work, it would be greatly appreciated.
Thanks!
|
|
|
|
|
Quick answer: you can't. ILMerge will only merge .NET assemblies.
Long answer: yes or maybe. One method is to embed the dll as a resource and extract and load it at runtime. This method works as I've done it before. Another method is to extract the resource into memory and directly call the C++ functions. I know its possible to do it from unmanaged, but haven't attempted it from managed yet.
--
Joel Lucsy
|
|
|
|
|
Joel Lucsy wrote: One method is to embed the dll as a resource and extract and load it at runtime. This method works as I've done it before.
There is a catch though! Mixed mode assemblies must be loaded from file, it cant be loaded as a byte[].
|
|
|
|
|
Hi,
I am a newbie in .Net,
can u tell me how to use the ILMerge utility
i have downloaded the utility from Microsoft's site.
I am using VS2003
Thanks
Pramod
|
|
|
|
|
Hello Joel / All,
Thank you for your responses.
My C++ DLL POST2STK_LIB.dll is a .NET Assembly. It was created and compiled in Visual Studio .NET as a C++ project. The only real difference between it and my C# executable is the DLL contains unmanaged C++ code. But it is still a .NET Assy as best as I can tell. So it would seem there should be a way to use ILMerge to create the single executeable.
For what it's worth, since my dll contains unmanaged code, you can see in my "call" to run ILMerge, I had added the /zeroPeKind switch as my understanding is this is required to attempt to merge the unmanaged code DLL into the executeable. And, if this switch is not used, you get the following compiler error during the ILMerge process stating:
"Performing Post-Build Event...
An exception occurred during merging:
ILMerge.Merge: The assembly 'POST2STK_LIB' is not marked as containing only managed code.
(Consider using the /zeroPeKind option -- but read the documentation first!)"
Thanks again.
Mike
|
|
|
|
|
mikester222 wrote: For what it's worth, since my dll contains unmanaged code, you can see in my "call" to run ILMerge, I had added the /zeroPeKind switch as my understanding is this is required to attempt to merge the unmanaged code DLL into the executeable.
And did it work? AFAIK there is now way to do this, if you however find an answer, be kind enough to share Thanks
|
|
|
|