|
mnkh wrote: what does dat means
hmm. according to google[^], its an acronym for "digital audio tape".
|
|
|
|
|
hahaha....
Maniiiiiiiiiiiiiii
|
|
|
|
|
If I have an assembly, eg Foo.Dll
And then create a config for it , eg Foo.Dll.Config
What are the requirements for the config file to be uses?
Is it possible to load such config (standard .NET config) for a dynamically loaded assembly?
or can I somehow force a specific config to be loaded so it can be accessed from the Settings class?
The problem I'm facing is a 3rd party tool that loads assemblies from a specific folder.
And I want to supply a standard .NET config for those assemblies.
Right now, those configs are apparently ignored and the settings will fall back to the hardcoded values in the settings class that VS.NET generates..
|
|
|
|
|
Does this[^] help at all?
|
|
|
|
|
im trying to get the base address of an application but everytime it returns 0, so i tried on other apps too but everytime 0. Can anybody tell me where is the mistake in my code ?
uint Base_Add = (uint)APIDeclaration.GetModuleHandle("wmplayer.exe");
[DllImport("kernel32.dll")]
public static extern IntPtr GetModuleHandle(string lpModuleName);
thanks
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
I have a struct in C# application used for serial port communication.
I have to read the struct value send from C# application to a C application.
What is to be done???
Thanks in Advance
San
|
|
|
|
|
This was asked the other day with the accepted solution here[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
You are running serial port communication between 2 managed program?
|
|
|
|
|
C# program is wrting the data.
C program is reading the data.
Regards,
Sangeetha
|
|
|
|
|
okey then the best way to do this is to define a sort of a 'communication protocol' between two devices :
First byte : message lenght (or data length)
data bytes : your data
byte that holds checksum
[data length][.....data.....][checksum]
then in your C# program you have to create a class that build the message you have to send :
calculate length
convert your structure on a data array (*)
calculate the checksum
-> So here we are in the core of your question:
the best way is to loop over EACH element of your strucuture convert it into byte array and the add it to data array
use BitConverter class :
BitConverter.GetBytes (T) -> T is an elementary type (float, double, char, int, etc...)
|
|
|
|
|
Could u please send any sample code or link to imlement this. I am a beginner to this
Regards,
San
|
|
|
|
|
San wrote: I am a beginner to this
Then start with something simpler, like Hello World. If however you're being paid to do this I suggest you go to your employer and tell them you are not yet capable of the task you have been set.
|
|
|
|
|
Hello !
Don't be so Rude
we all were beginners some time !
|
|
|
|
|
Yes, and we started with beginner-ish tasks, not in-depth like this sort of thing.
|
|
|
|
|
|
let suppose your have this Class :
class SomeClass
{
double l;
double [] m = new double [10];
string s;
byte [] ToByteArray ()
{
List<byte> b = new List<byte> ();
b.AddRange (BitConverter.GetBytes (l));
for (int i = 0; i < m.Length ; i++)
b.AddRange (BitConverter.GetBytes (m [i]));
char [] tabc = s.ToCharArray();
for ( int i = 0 ; i < m.Lenght ; i++)
b.AddRange (BitConverter.GetBytes (tabc [i]);
return b.ToArray();
}
}
SomeClass c = new SomeClass ();
byte [] b = c.ToByteArray();
|
|
|
|
|
|
It's not as simple as it sounds
List.Count != Color[].Length
so I can't use List.ToArray()
List<color> will have n number of colours. I expect usually around 5-6. Color[] will probably have Length of 256. I want to dynamically blend the few colours from the List<color> into Color[].
I'm trying to split the 256 into sections and blend 2 colours at a time. ie 256 / List.Count -1
My head's not in gear today so the Maths is escaping me...
Any help appreciated.
PS I'm playing with Fractals and I want to implement an editable colour palette. I did it a couple of years ago but I lost of the code and I'm trying to redo it...
|
|
|
|
|
And what do you want to do? Blend some colors from List<> with different colors from Color[]?
To blend 2 colors at a time you don't need to split anything but rather write a loop that processes somehow each pair of colors. Then increments by 2. However, I'm confused about what you want to achieve...
|
|
|
|
|
Ok, having googled a bit more, the terminology is interpolate.
I have, say, 5 colours that I need to interpolate across a Color[256].
|
|
|
|
|
Hi,
I have a string which looks something like:
ABCDEF\\123456
I am looking to return 123456, it will always be 6 characters long. I tried IndexOf and LastIndexOf on the \ but they both returned the same index number. Isn't there a Right function like in Visual Basic?
Thanks
Brendan
|
|
|
|
|
You could use substring. If it's always the last 6 chars you want then this should work:
string newString = oldString.SubSTring(oldString.Length-7, 6);
Might be an even easier way though.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
I found the answer:
string MyString = "ABCDEF\\123456";
string End = MyString.Substring(MyString.Length - 6);
|
|
|
|
|
You should NOT rely on the *expected* length of the string.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
If you're going to need this functionality regurlarly you could create an extension method.
public static class Extensions
{
public static string Right(this string str, int length)
{
if (length < str.Length)
return str.Substring(str.Length - length);
return str;
}
} then, so long as you've added the namespace you put the above into in your using statements at the top you can use it like any other built in string method i.e.
string x = @"ABCDEF\\123456";
Console.WriteLine(x.Right(6));
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
modified on Friday, August 29, 2008 5:53 AM
|
|
|
|