I have declared an internal class to store the functions of the MFC DLL
internal static class Translate
//Importing unmanaged Translation DLL
#region Translation DLL
[DllImport("ECTalc.dll", ExactSpelling = false, EntryPoint = "EC_newInstance")]
public static extern int EC_newInstance();
[DllImport("ECTalc.dll", ExactSpelling = false, EntryPoint = "EC_initSys")]
public static extern int EC_initSys();
[DllImport("ECTalc.dll", ExactSpelling = false, EntryPoint = "EC_quit")]
public static extern void EC_quit();
[DllImport("ECTalc.dll", ExactSpelling = false, EntryPoint = "EC_destroyInstance")]
public static extern void EC_destroyInstance();
After which at a point, I have these two statements:
However when my program loads, Translate.EC_newInstance(); is able to load but not Translate.EC_initSys();
The given error is as follows : "Error reading system data files. Please reload the files."
Could anyone enlighten me on this problem?
I created a class library project dll , i wanted to add this dll in the windows/assembly folder for the purpose of making it public assembly.
For that , i created a strongname key file , then i added that file information in the assembly file of the classs library project dll.and afterwards i build the project and finally i wrote the following syntax
gacutil -i "dll path"
this added the dll in the assembly folder.
now whenever i try to add the reference of the dll in the new project
should i get my dll (which is now in the assembly folder) in the dialog box of add reference .
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
I need to develop an applicaion to control over printer,
It should support-
Print Test Page
Get User name
Get IP Address / system name
Get Printer status
Current Printed page count
Toner Status etc.
Is this possible to develop this application using Printer Job Language (PJL) ?
I would like to develop an application for printer using Printer Job Language .I am new in this domain. So, I would like to know that answers of the following questions.
1. Can I develop this application in C# using PJL
2. If yes, then how can I send command to printer and how can I get response?
3. Is Hp p2015 printer support PJL?
Please send me any fruitful link or reference so that I can easily develop this application
I want to read entries from event log , I also developed that application but my requirement is that if i have to get log of only those entries which i specify between two dates. So for that i have to read all entries , and check whether that entry falls in that particular date range but it is very slow process , i want some faster logic for example if i give a date it directly jumps into that date entry and give me the details.
System.Data.SqlClient.SqlException was unhandled
Message="An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Source=".Net SqlClient Data Provider"
can any ne help me to handle this exceptionplease.
i'm not ale to connect sql server
i'm a begginer, and developing a databse(MS sql) driven application in visual c# and i have to veify userid and password through connecting database and extracting information from user table.
i'm getting any ideas how to do this please any one can help.
Hi everyone, I have a problem on redirecting standard input to another file stream. Using cmd.exe, I could simply run a program like this program.exe < textFile.txt. Using this, when I use Console.ReadLine() it reads a line in my text file. But I need to run the program in other C# application, so I used Process.Start() for this. Having a ProcessStartInfo with FileName = "program.exe" and Arguments = "< textFile.txt". But using this, it just passes the arguments as strings, not redirecting the standard input to the specified file. Is there a way so that it won't be parsed as a string? Or another way to redirect the standard input?
Thanks for the reply. I tried using it but Process.StandardInput is read-only. So I have to use Process.StandardInput.Write(File.ReadAllText("textFile.txt")). Assuming textFile.txt is a very big file, it uses up big memory when reading the contents of the text file. I wanted StandardInput be set to another stream just like Console.SetIn(). Is it possible or is there a better way?