|
I have written a custom OLE DB Provider for a propritary Database (built on top of SQL Server provider). I want to move all my code to .NET from VC 6. Since the .NET Data Providers do not provide functionality outside of ADO.NET (Like in Excel or Crystal Reports) I cannot use the new data provider platform. Is there a way through COM interop that I can consume a datatable in COM so I can have a .NET dll that does 90% of the work with my original provider code consuming the output of the new dll. I have seen all the COM interop examples and they all use the basic types like string double etc. If anyone has any ideas please let me know.
|
|
|
|
|
I am trying to write a black and white (Tiff) image viewer using GDI+ in C#. I want to take a 1 bpp tiff file and display it to the user in "Grayscale". Does anyone have any examples of this type of filter? I am looking to mimic the "softening" of the tiff image that can be seen if viewing a tiff in the Windows Picture and Fax viewer or the MODI viewer. I can get misc. filters to work on jpg images, but and having difficulty working with 1bpp tiffs. Any help is much appreciated.
Brian
|
|
|
|
|
check this and ask Christian Graus here on CP
http://www.thecodeproject.com/cs/media/csharpgraphicfilters11.asp
|
|
|
|
|
Hi,
We’re in the process of designing a server-side application.
The first "filter" component of the server should receive requests from multiple concurrent clients over TCP/IP, each request containing an entity ID number. The filter should then process each ID and decide whether to pass it on to the next component (database) according to a given set of rules. The first version of the system should deal with around 20 concurrent clients producing ~1,000 requests per second, but future versions should be much more scalable (up to hundreds of concurrent clients and ~100,000 requests per second). The development environment is Microsoft .NET on Windows 2000 servers.
We came up with two possible architectures for the filter component:
1. Maintain a different communication thread for every client. Every such communication thread receives ID’s from its corresponding client and writes them into a common queue. A different worker thread reads data from the queue and processes the requests.
2. Maintain one communication thread for all clients. The communication thread reads ID’s and writes them into a queue. Several worker threads, managed in a thread pool, read data from the queue and process requests.
The first solution is obviously less scalable, since when the number of clients increases the overhead of a large number of threads starts affecting performance. Still, it is easier to code and it fits the first version/versions of the server.
Our question regarding the second solution, which seems more "server-oriented", is this: when taking into consideration the large number of requests per second and the fact that the processing time of each request is relatively short, isn’t the overhead of managing a thread pool, allocating a worker thread for every new request and returning it back to the pool when finished, etc. becoming too expensive ? Won't this affect the overall performance ?
In addition:
1. What should be the limit (roughly speaking) of the number of concurrent communication threads we can expect to run on a standard Windows 2000 machine ?
2. Is there any other alternative for the design of the filter component ? Are we missing something basic ?
Thanks in advance,
Amir.
|
|
|
|
|
Hi...
Is it possible to catch every single mouse click message like WM_LBUTTONDOWN regardless which application is active? I tried using IMessageFilter but it is limited to the current application.
Thanks
|
|
|
|
|
|
I want to make my own custom .NET framework launch condition message. I've tried to simply change the message property in the Condition node but that didn't work. I've read the "Adding a .NET Framework Launch Condition" section in Visual Studio help. It says "You can replace this with your own message; however, the message will not be localized automatically". This may be a newbie question but how do I localize my custom message?
|
|
|
|
|
I kept the default message, wrote my message outside of the brackets and it worked but the default message still showed up in the message box.
|
|
|
|
|
I would like to check if any specific program, e.g. Excel, running.
Can anyone here help me?
Same effect as when upgrading IE, it will check if there is any IE running, if yes, it will warn the user to close all IE before continue.
Thank You!!! ;)
|
|
|
|
|
Hi,
Using the System.Diagnostics namespace, you can do this:
Process[] excelProcs = Process.GetProcessesByName("excel");
if (excelProcs.Length > 0)
// there we have excel.exe(s) running
|
|
|
|
|
Hi All,
I have some frames(GroupBoxes) for my application and would like to know when the mouse comes onto the frame(GroupBox). Any ideas please. Or can I know the coordinates of the mouse when I am on the frame(GroupBox)(Some thing like that)
Thanks in advance.
Sreepathi
|
|
|
|
|
.NET Framework Class Library
Control.MouseHover Event
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassmousehovertopic.asp
|
|
|
|
|
Thank you very much and the mouse move event also raises on the frame.
Sreepathi
|
|
|
|
|
Hello,
I want to implement a Replication with a SQL Server CE and a SQL Server Database, so i created once a virtual directory and a new SQL Server Registration because before i had only a (local)(WindowsNT)registration and with this a Publication is not possible.
Create Virtual Directory:
So i have created a alias name with the following attributes:
alias: pat
Anonymous access
At NTFS Permissions: Computer Running SQL Server i have the "One or more
applications ruquiring SQL Server merge application" nocht checked, because i
could not quote a correct path to the SnapShot Folder??
Then i have deleted the current SQL Server and created a new SQL Server
Registration with the following attributes:
As Available Servers I add my MachineName.
The i checked "The SQL Server login informatoin that was assigned to me by
the system adminstrator(SQL Server Authentication)".
Then i checked "Login automatically using my SQL Server account information"
and typed in as Login name sa and as password also sa.
Then i checked "Add the SQL Server(s) to an existing SQL Server group".
I hope i made these things in a correct way, regardless of the thing with
the SnapShot-Folder??
So now i want to Create a Publication, but already in the first point of the
Wizard i got problems:
1)
At "Select Distributor": What should i check? When i check 'Make
'MachineName' its own Distributor;SQL Server will create a distribution
database and a log" - I will get an notification (SQL Server Agent on
'MachineName' currently uses the system account, which causes replications
between servers to fail. In the following dialog box, specifiy another
account for the Service startup account.) and the SQL Server Agent Properties
- MachineName opens??
When i check "Use the following server(the selected server must already be
configured as a Distributor);" - I have to add a server but regardless of
the (local) Server i could not choose anyone??
2)
At the "Configure SQL Server Agent" should i check "Yes, configure the SQL
Server Agent service to start automatically?
3)
Then i have to quote the SnapShot-Folder:
\\MachineName\C$\Programme\Microsoft SQL Server\MSSQL\ReplData
When i use this path i'll get an notification - "The Snapshot folder path,
'\\MachineName\C$\Programme\Microsoft SQL Server\MSSQL\ReplData', uses a
special share name which can ususally be accessed only by a login with the
adminstrative privileges on computer 'MachineName'. This share my not be
accessible by agents running on other computers, such as the agents for pull
subscriptions. Are you sure you want to use this snapshot folder path?" -
Should i care with this notification??
3)
And another great problem: When i click on okay of the following
notification i will get another notification: "SQL Server Enterprise Manager
could not retrieve information about the Distributor of the database. Error
1038: Cannot use empty object or column names. Use a single space if
necessary." And when i click on okay and the "Choose Publication Database"
screen appears i cannnot choose any database because in there do not appear
any databases. What went wrong here?
Please, can anybody help me with these things and answer me to my posting, because i do
not really look through it although today i bought me the book ".NET Compact
Framework Programming with C#", but this book did not help me.
So hopefully anybody find time for me!
Regards
mat
|
|
|
|
|
On inspecting a manifest file I have been given two
references to the same assembly but at different versions.
.assembly extern CustomAssembly
{
.publickeytoken = (..) // ...?..Yh
.ver 2:8
}
.assembly extern CustomAssembly as CustomAssembly_5
{
.publickeytoken = (..) // ...?..Yh
.ver 2:2
}
I removed all references to assemblies and re- added them. Removed the .sou file from vs.net so to regenerate them. Checked the sln file and .cproj files for additional references but to no joy.
I am not sure if its a bug that has been fixed in a later version of .NET. Due to requirements .NET 1 SP2 framework is being used with VS.NET 2002.
I generated the dll using the csc tool and the same reference error occurs. So I imagine it is a compiler issue.
|
|
|
|
|
Hi I want to learn,
Is there a way to compile my c# projects that will work properly on the windows OS which is not installed .NET Framework. So I wanna make a regular exe like in C++
karanba
|
|
|
|
|
karanba wrote:
Is there a way to compile my c# projects that will work properly on the windows OS which is not installed .NET Framework.
No, the .NET Framework must be installed. Also, remember that this is a one time operation - You only need to do this once, regardless of how many .NET applications are installed on the machine.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
okey but many machine still does not have .NET Framework. In Net Framework developing is very easy agains C++, and I need a method that my NET Framework Appies would work on an win32 sytem
karanba
|
|
|
|
|
karanba wrote:
many machine still does not have .NET Framework. In Net Framework developing is very easy agains C++, and I need a method that my NET Framework Appies would work on an win32 sytem
Well, which is your priority? Easier development with the .NET Framework, or having it work on any win32 system?
If it is with the .NET Framework then you have to install the .NET Framework on the machines you are deploying your application to. If it is any win32 system (including those without the .NET Framework, and that will not be installing it) then you will have to develop in C++.
You have to make a choice.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
|
hi, can anyone please give me a hint of how can i retrieve all the Machines name and IPs in my network whether its a workgroub or domain. thanks in advance.
|
|
|
|
|
Hey!
I had the same problem, i found this app here http://thecodeproject.com/vb/net/MyLanApp.asp
just read the source
|
|
|
|
|
thanks that was really helpfull, but i think that this method only works when there is an Active Directory installed, is this right?
so i need a generic way to retrieve the machines in the network even if it was a workgroup!!!
|
|
|
|
|
Basically what you'll need to do is use the DOS utility "net view". When you type it in the command prompt, it lists all computers on the network whether Active Directory is on or off. All you'll have to do in your app is to call the Shell using "net view" as a command and adding ">C:\myfile.txt" (this is the location where all the net view info will be stored). Just read the file from your app and parse the string to get the list. I've already seen several VB6 apps doing this and have tried it myself on WinXP and it works fine. Check out NetSend (VB6) here http://www.a1vbcode.com/download.asp?ID=2503 it does exactly what you need ;)
|
|
|
|
|
Thanks for your help this is exactly what i wanted.
|
|
|
|