|
And where do you speciffy the datasource for your Datalist?
That is my signature.
It makes sense if you understand it
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I have a client that is using a usb cash drawer with our program. I have the driver and the calls that has to be made to that driver to kick the cash drawer open. The driver is a dll file. How do I reference this driver via vs2003, If i try to add it as a reference it says that the file is an invalid assembly or com component.
Has anyone done this before that may be able to help or give any ideas.
Thanks in advance.
|
|
|
|
|
FROM MSDN:
The DllImportAttribute attribute provides the information needed to call a function exported from an unmanaged DLL. As a minimum requirement, you must supply the name of the DLL containing the entry point.
[DllImport("KERNEL32.DLL", EntryPoint="MoveFileW", SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool MoveFile(String src, String dst);
|
|
|
|
|
Hi All
This is probably a really easy question!!
I have a C# web service, when its up and running either in debug mode or it has been released.
Is there any way to set the order of the web methods. My methods seem to be randomly ordered
Any ideas
Si
uets
|
|
|
|
|
What do you mean by randomly orderd?
Randomyl orderd where?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I'm using a proprietary DLL written in C, which has a function that takes an array of ints (int pointer) as a parameter and writes data to the array. I've been trying to call the function in C# using Interop/DllImport, but no matter what I try, I can't get it to work.
My DllImport is (currently) as follows:
[DllImport("chli.dll")]
internal static unsafe extern void cfmsrng(ref int status, int object_frequency, ref int object_startyear, ref int object_startperiod, ref int object_endyear, ref int object_endperiod, int *date_range, ref int observations);
"date_range" is the parameter that I'm having trouble passing. All of the others work fine using "ref" (I have other similar extern functions that do work).
I've tried various combinations of using int[], int* (with unsafe declarations), IntPtr and [In, Out], but to no avail. I just recently discovered the "fixed" keyword and after reading on that, I tried using it, but still had no luck.
Could anyone please tell me what I need to do to make this work? Any guidance would be much appreciated.
Thanks.
-- modified at 6:41 Thursday 16th March, 2006
|
|
|
|
|
use void* instade of int*.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Hello I have a strange problem. I have implemented the ISerializable interface for 2 classes.
the GetObjectData implementation of the first class is:
<br />
public void GetObjectData(SerializationInfo info, StreamingContext context)<br />
{<br />
List<Register> lstRegister = new List<Register>();<br />
info.AddValue("Text", this.Text);<br />
foreach (Control c in this.Controls)<br />
{<br />
Register reg = c as Register;<br />
if (reg != null)<br />
{<br />
lstRegister.Add(reg);<br />
}<br />
}<br />
Register[] registers = lstRegister.ToArray();<br />
info.AddValue("Registers", registers);<br />
}<br />
the serialization constructor is the following:
<br />
protected VisualTabPage(SerializationInfo info, StreamingContext ctxt)<br />
: this()<br />
{<br />
this.Text = info.GetString("Text");<br />
Register[] registers = (Register[])info.GetValue("Registers", typeof(Register[]));<br />
this.Controls.AddRange(registers);<br />
<br />
}<br />
for the Register class I have implemented also this interface and it was working well:
I have tested it with the following helper class:
<br />
[Serializable]<br />
internal class SerializeTab<br />
{<br />
private string name;<br />
<br />
public List<Register> visObjects = new List<Register>();<br />
<br />
public string Name<br />
{<br />
get { return name; }<br />
set { name = value; }<br />
}<br />
<br />
}<br />
Now if I Deserialize the object, there is a Register[] array with one item, but this item is null.
Has anyone an idea what can cause this?
Regards
Hansjörg
|
|
|
|
|
Hi
This might be to do with the way .Net serializes complex types - it doesn't do it all at once.
Save the array to a private member field in the serialization constructor, then have a look at this when the whole serialization process has completed.
If this works, you will either have to implement IDeserializationCallback , or possibly even a Fixup method that must be called after deserialization.
----------------------------
Be excellent to each other
EasiReports[^] My free reporting component for WinForms.
|
|
|
|
|
I have tested this also. it doesn't work. At the moment I have made an workarround in serializing the array as Register0, Register1 ...
It is not a good solution, but it works. I hope to remove this workaround in the next days, weeks...
Regards
Hansjörg
|
|
|
|
|
I want to create the calculator program in winapi environment using c++ but i don,t know to to create that.I hope anybody can help me to send the full coding within comment.Please separate the file from cpp,h and so on.I want asa soon as possible.I'm very apprecite if anybody can help me.Please....
hai
|
|
|
|
|
1) You post a C++ question in the C# forum
2) You are posting your homework and expecting the answer
3) You EXPECT someone to not only write the WHOLE app for you, but to separate the files out to your preference
4) You ask for a personal reply on a public message board.
My advice is to quit now and search out your nearest retail/checkout job and stick with it.
oops, forgot the constructive bit. Read this[^]
-- modified at 5:52 Thursday 16th March, 2006
|
|
|
|
|
Ruzimi wrote: I hope
Hope...Mortal sins.Don't hope just study.
|
|
|
|
|
I hope that nobody write this program for you!
|
|
|
|
|
Very strange !!!
It's very easy to find this program. In this web site you can enter "calculator" in search field and you have several results in C++.
|
|
|
|
|
Oooooh man you just helped the dude...Shame on you
He was such a moron he couldn't just search the site.
By the way can he cross the street by his own or he needs someone to show him how?
(i'm in a very bad mood today...grrrrrrrrrrrrrr.I haven't drunk coffee yet and its 2:38 in the noon grrrrrr)
|
|
|
|
|
Why shame for him?? He just helped him (at his homeworks)...
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
I disagree in part, this kind of help would be perfectly good if the OP had shown some ettiquette with his request.
I was also in a bad mood at the point i replied earlier - could you tell
|
|
|
|
|
J4amieC wrote: 3) You EXPECT someone to not only write the WHOLE app for you, but to separate the files out to your preference
Come on be nice with the dude.That was all he was asking ??? NO NO NO.Its not a matter of preference but of attidute.He is unthinkable he is getting on my nerves.
Ruzimi wrote: I hope anybody can help me to send the full coding within comment
Ruzimi wrote: ... within comment
Ruzimi wrote: ... within comment
Ruzimi wrote: ... within comment
It's sounds like a bell in my ear...
Within comment...Good Lord he must be joking.It would be much easier if he would asked us to call his professor and impersonating him.
|
|
|
|
|
What's up with the appname.vshost.exe threads that are executed whenever you fire your app?
I've tried to kill it, but it just keeps reappearing.
What does it do? I get a runtime error in my app saying that my progressbar is already used by another thread. (presumably the vshost one, 'cause my app isn't running)
I also can't figure out the reason for 2 exe's instead of 1?
thanks!
No hurries, no worries.
|
|
|
|
|
hi to all,
i made a little c# program that print a word document and it works. i put the same code in a c# windows service and it does not print the document. it does not generate an error. when i debbug the service, it execute properly word, open and print the document, but i have no output on the printer
do i miss something ?
best regards and thanks in advance
fady
|
|
|
|
|
Hello,
I use my own listview control. After a drag&drog, I lose scroll position. I backup scroll value, but after drag&drop, I call the SetScrollPos function, the scroll move, but not list items, how to go to the right items position ? May be use ScrollEventType.SmallDecrement until to go to the old position ?
thanks
|
|
|
|
|
I need to show images and text pages in a document viewer.
In windows applications we can view the images in picture box, without caching, ie when we view the doc in any browser we cannot copy it.
So I need a control like windows picturebox in asp.net.
pls help me in this regard.
Rambabu apollo
|
|
|
|
|
I need to show images and text pages in a document viewer.
In windows applications we can view the images in picture box, without caching, ie when we view the doc in any browser we cannot copy it.
So I need a control like windows picturebox in asp.net.
pls help me in this regard.
|
|
|
|
|
Hello
I have an aspx page with a number of controls, including a few ascx usercontrols. Ive come to realize that the page_load event for this page fires several times every time a postback occurs. The number of times it fires is different depending on what triggered the postback, for one button it may be four times, for another 6 times. Also, IsPostBack is set to False for almost everytime, and then suddenly for page_load nr 4 out of 6 its set to true, for an example. I cant seem to figure out what makes it fire so many times, or why IsPostBack is set to False, or why all of a sudden its set to True and then back to False.
Does anyone have an idea what the cause of this might be?
/Regards Magnus
-- modified at 6:07 Thursday 16th March, 2006
|
|
|
|