|
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();
#endregion
//endregion
}
After which at a point, I have these two statements:
Translate.EC_newInstance();
Translate.EC_initSys();
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?
|
|
|
|
|
Sounds like a path or something is not setup correctly. Either way, the issue seems to come from the ECTalc.dll, so ask the authors of that what the issue is.
|
|
|
|
|
Hi there,
Yup I managed to solve it already. The problem lies in the configuration of the DLL when i approached the author. Thanks for your help. Much appreciated.
|
|
|
|
|
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!
|
|
|
|
|
Pankaj Garg wrote: 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 .
Yes.
|
|
|
|
|
If it is deployed to GAC, you will get it in the add reference window.
|
|
|
|
|
Pankaj Garg wrote: in the dialog box of add reference
I always use the Browse or Projects tab to get the DLLs I write, whether in the GAC or not.
|
|
|
|
|
Hi,
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) ?
your quick help is appreciated.
Thanks.
Sunil
|
|
|
|
|
Funny how everyone wants to do PJL all of a sudden...
|
|
|
|
|
Hi
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
Regards
Rajesh
rajesh
|
|
|
|
|
When you found the answers for question 2 and 3, come back to ask your C# question.
|
|
|
|
|
Hi,
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.
regards
modified on Wednesday, July 9, 2008 1:07 AM
|
|
|
|
|
While not specific to your problem, I have noticed some new classes in .NET 3.5 in the System.Core.dll, specifically System.Diagnostics.Eventing.Reader namespace. That may or may not be of some help
|
|
|
|
|
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"
ErrorCode=-2146232060
can any ne help me to handle this exceptionplease.
i'm not ale to connect sql server
diggudg
|
|
|
|
|
diggudg wrote: this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections
Enable remote connection in SQL Surface Area Configuration Tool
|
|
|
|
|
your firewall might be blocking it
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
hello
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.
with warm regard
diggudg
|
|
|
|
|
It's trivial. Create connection using SQLConnection class. Create command using SQLCommand instance, execute the query using SQLCommand.ExecuteReader() .
|
|
|
|
|
Use Integrated Security. If they can connect to the database, they're OK.
|
|
|
|
|
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.
|
|
|
|
|
|
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?
|
|
|
|
|
Why not just take the filename as a parameter?
|
|
|
|
|
The program to which I call was made by another person and I don't have its source code. I do not have any means of changing how the parameters are passed.
|
|
|
|
|
In that case, it might be better to just write the complete file as byte[] in contrast to a string, it should help reduce memory and gain a little speed.
|
|
|
|