|
.S.Rod. wrote:
Marshal.ReadIntPtr
Dope, how did I miss that one again (some bells ring)? PtrToStringAnsi frees the string, would FreeHGlobal(pData) at the end be right then?
Thanks for the reply
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
|
Hmm, I allocated the unmanaged memory with calloc, is FreeHGlobal an alias for that or do i need to dllimport that?
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
calloc , malloc or even new are not good when you are crossing the managed boundaries. Indeed, the only way to make sure the allocated memory is NOT freed or moved when it's being marshaled is to allocate the memory block in a shared space, hence CoTaskMemAlloc (for allocations), and FreeCoTaskMem (for deallocations).
|
|
|
|
|
I have this program where I'm supposed to copy a datarow into another databale. Herefore I use the ImportRow method. The problem is that this method does not return the newly created datarow. Can anyone tell me how to get the new datarow that is created after calling ImportRow? Or is there a better way to copy a datarow between tables?
Thanks in advance
|
|
|
|
|
Hi,
DataTable.LoadDataRow might work better for you.
Hope this helps.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Woops, overlooked that one
Thanks Andres !!!
|
|
|
|
|
can anyone tell me when the treenodes are drawn,when the background is redraw and when the treeview is scrolled what event is raised?
|
|
|
|
|
Use Spy++ to inspect fired events
Regards
|
|
|
|
|
Hello,
In an application I am running I would like to be able to shutdown IIS's FTP
service if a given condition is met. Is there a way to access the FTP to be
able to shut it down without having to shutdown all of IIS (I have a couple
of websites I would like to keep running). I am using C#.
Thank you,
Paul
|
|
|
|
|
You should be able to just access the FTP service on the box by using the Service Control Manager APIs.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
I'll be darned if I can find a simple code on the entire internet to implement a ProgressBar for a common File.Copy procedure. One that actually show real-time progress and not just a timer or
min-max settings. Help
File.Copy(txtAudioSourceDir.Text + txtAudioSourceFile.Text);
|
|
|
|
|
I don't think there is a framework way for you to track the progress of the copy. The only way I see you doing it is to read the bytes into abuffer and then write them again. From that you can get your progress values on the number of bytes read/written.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
|
Hi Codegurus,
I keep getting MouseMove messages without the mouse moving at all!! .. have anybody been in the same situation? Hopefully it's not a bug, I doubt that that behavior is intended by design. This's what is written about MouseMove in MSDN, "Occurs when the mouse pointer is moved over the control".
More info...
// Used Software
VS .NET 2002
Microsft .NET Framework 1 SP2
Windows 2000 SP2
IE 6, DirectX 9 SDK
Thanks,
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
Do you know of any equivalent to the PaintDesktop() Win32 API function in the .NET framework?
Many thanks
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
I try to add a 3rd party control to my project. I added the reference to the DLL. (via Add Reference)
But I don't see the control in the toolbox.
What I'm missing?
[edit] It's not strong named assembly and the control works properly with the provided sample project. [edit]
Don't and drive.
|
|
|
|
|
Hi,
why don't you add it by customizing the toolbox or did I understood something wrong?
Greetz
Torge
|
|
|
|
|
Torsch wrote:
customizing the toolbox
I did it and it worked.
Thx.
Don't and drive.
|
|
|
|
|
Huhu,
sure...customizing the toolbox is like giving a hore 1,000 €
Greetz
Torsch
|
|
|
|
|
Right click on the toolbox and go to Customize Toolbox. Add the reference to the DLL from there and you'll see the control in your toolbox.
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
David Stone wrote:
Add the reference to the DLL from there and you'll see the control in your toolbox.
Duah...It worked.
Earlier I thought the list in the "Customize Toolbox" dialog is generated when you add the reference to the project. I didn't saw "browse" button. Agh!!!
Learning something new everyday in this stupid .noet world ...
Thx.
Don't and drive.
|
|
|
|
|
Hello!
I've a big problem with the Panel's Autoscroll function...
I want to draw on-the-fly on a picturebox located in the panel.
F.e. the pBox's Size is 500*500 and the panel's Size is 100*100 and the panel's autoscroll function is set true.
If i click on the scrollbar's button for a single scrollstep, everything's fine.
But f.e. I click in the Hscrollbar and track it to make a step of 50 pixels, the new Area shows me 50 pixels of the "old" picture and the rest is empty.
So I guess, I've to tell the panel that it has to perform the same action as it performs, if only a one-step scroll is performing.
But how? And Where?
I've failed by tracking the Event, which is activated by scrolling...
Or is there another way to scroll a on-the-fly drawn picture?
Thank you for helping!
Greetz
Torge
|
|
|
|
|
Welcome to the stupid world of the .NET scrolling support. If you are planning on doing more than just a little bit with that scrollable panel, you might be better off just writing your own. That's what I'm doing. When I'm done, I'll probably write an article about it and put it on CodeProject, 'cause so many people have asked for it.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi,
maybe we could do it together...
mail me please...
Cause I'm on a project in my studies and I've to make this fool become god-created wellfish
So if you like we better work together...
I've the opportunity to ask one of my Profs, who works over twenty years in the software engeneering buisness, a c++ overgod and a mentor of mine, so we hopefully could work with his force...
Greetz
Torge
|
|
|
|