|
riced wrote: It isn't and does not need to be unless you want to compare the number of bytes read with size of buffer
Well, it is always necessary, because on last read, the buffer is partially filled, so the last write is not full buffer contents.
Best regards,
Jaime.
|
|
|
|
|
.
modified 2-Apr-21 5:17am.
|
|
|
|
|
What on earth are you doing ? Creating dlls from resources ? How bizarre. Why create one at c:\ ? Perhaps if you showed us the actual code and told us the actual error message, we could help more ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Add your directory name to the environment PATH variable. Windows searches these directories to find referenced dll files.
|
|
|
|
|
|
Yes, it would seem my brain saw the word 'dll' and immediately thought 'C/C++', whereas the actual forum is C#. I'll check these links out for future reference; thanks.
|
|
|
|
|
|
Hi
I think that you are searching for the Assembly.Load method that load an assembly for dynamic invocation.
|
|
|
|
|
Given that you're creating them yourself, why not just put them in the right place ? c:\ is a RETARDED place to put dlls for your program.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
if this dll is a com-dll you can register the dll with regsvr32 "C:\your_com.dll".
To use the dll you need to declare the function like win32api in dotnet with a DllImport()..
if the dll is a .net assembly load the dll with System.Reflection.Assembly.LoadFile().
don't know what you want to do or your program.. if you dont want to write code using the dlls try to reinstall your programm using the dlls
greetings
|
|
|
|
|
Hello, all!
First, there is an integer array for example 1,2,3,4
Second, there are logical "rules" of following types: 1&2 = rule_1, 1|3 = rule_2, 1^4 = rule_3
(& - AND, | - OR, ^ = NOT)
The task is to search for the rules. So the question is how can I implement this kind of search, are there any source codes or libraries? I'll be very glad if someone helps me to cope with this problem and offers some ideas or examples especially on C#. Beforehand, great thanks!
|
|
|
|
|
Your question is unclear hence no replies.
You might want to try rewording it.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
I have an arrray of simple rules ID (int), my task is to search complex rules, containing simple rules that are united with each other by logical operators such as OR, AND, NOT. For, example, I have a complex rule 1 AND 2 NOT 3. There are simple rules IDs 1,2,4. If you search complex rules you will find complex rule (1 AND 2 NOT 3). So is it clear for you now, if not try to explain what you don't understand. Thanks.
|
|
|
|
|
Hi All,
I have created a baseclass by subclassing the Textbox control. I have many forms and want to ensure that the textbox controls all use the same font etc...
I want the statusbar of the form to show information about the control you are currently sat in so for example if it was a phone number it would show the format (99999) 000000. I am trying to set this in the enter event of the baseclass.
So I created an Event and a Delegate on the baseclass something like this:
public event EnterControlHandler EnterControl;
public delegate void EnterControlHandler(string strStatus);
public virtual void OnEnterControl(string strStatus)
{
if (EnterControl != null)
EnterControl(this.StatusText);
}
I then tried to handle the event in the form:
protected void EnterControl(string strStatus)
{
//this.formloader(e.Node.Text);
this.statusForm.Text = strStatus;
}
The problem is the Enter event doesnt seem to fire.
I havent used delegates or events much so i could be using them incorrectly.
Am I going about this the correct way? If so any pointer on what I'm doing wrong?
Many thanks for your time.
Jon
|
|
|
|
|
Are you assigning event handler to EnterControl event? You need to do like:
yourTextBoxObject.EnterControl += EnterControl;
from the form.
|
|
|
|
|
Hello,
I have a compiled dll that contain class "MyClasses.dll".
One of the class is called "class1".
In runtime i need to compile a code that used "class1" and i need to used to compile code as dll in the runtime code. How can i do it?
Example:
1. MyClasses.dll contain class1.
class1 look like this:
delegate double GetRank(class1 c1);
public class1
{
public double Num1;
public double Num2;
public event GetMyRank;
}
2. I want to get a string and build a function in rumtime for sorting. for example the user can write n Textbox "Num1*Num2" and then i want to create this function:
public double GetRank1(class1 c1)
{
return c1.Num1*c1.Num2;
}
3. Compile and Create dll that contain this function.(GetRank1)
4. In runtime load the dll for exmple "MyDll.dll"
5. Initialize each instance of class1 with the event "GetRank1" for "GetMyRank" event. :
class1 c1 = new class1();
...
..
c1.GetMyRank= new GetRank(MyDll.GetRank1);
....
6. And then i want to compare 2 instance of 'class1' by this function.
I Allready try to use CodeDomProvider and CompilerParameters but i need the use the dll "MyClasses.dll" in the CompilerParameters and it does not recognize him:
ErrorText: "The type or namespace name 'MyClasses.dll' could not be found (are you missing a using directive or an assembly reference?)"
The second problem is how to use to compiled code in my code at runtime.
for example:
Assembly a = Assembly.GetAssembly(Type.GetType("GetRank1Class"));
and then try to call the function GetRank1.
How can i solve those problems?
|
|
|
|
|
My experience with this stuff is limited, from what I've done in the past I would say:
1.
you need to add references to all the managed DLL files you need at compile time, hence use
CompilerParameters.ReferencedAssemblies.Add(dllFileName)
2.
you can't use dynamic classes and methods as usual; you need reflection code for every instance and method, such as Assembly.CreateInstance() and Type.GetMember() and MethodInfo.Invoke() ; all of which is cumbersome.
Are you sure you need it? You didn't tell much about the real functionality of your app.
FWIW: I expect you can reduce the hassle by having a fixed interface that works like a contract for your dynamic class; once you get an instance (still through reflection), you should be able to invoke methods in the normal way as long as they are part of that interface.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
hi
IS there a different in WebService programming in 32bit and 64bit ?
under server 2003 (C# programming )
thank's in advance
|
|
|
|
|
AFAIK no. You just need to keep the target platform set as Any CPU.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hello, I`m making in Windows XP a Search Deskband [like the one in Vista] but i have a big problem: don't know how to get the current window address, so that it searches only in current folder and subfolders.
Thank you in advance!
|
|
|
|
|
curtuy wrote: the current window address
address??
could it be Directory.GetCurrentDirectory() you want?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
for a deskband Directory.GetCurrentDirectory() returns "C:\Documents and Settings\My user"
for ex: if i`m in D:\Games i want to get "D:\Games".
[Thanks for your fast responses ]
|
|
|
|
|
What is a window address?
|
|
|
|
|
Microsoft Way 1
Redmond
WA 98052, USA
I are Troll
|
|
|
|