|
|
Because you have Office 2000. PIAs work only with Office XP.
Alexandre Kojevnikov
MCP (SQL2K)
Leuven, Belgium
|
|
|
|
|
Looks like data in the registry went out of sync with your Office 2000 type libraries. As .S.Rod already suggested, try re-installing Office 2000, and applying the latest service packs.
Alexandre Kojevnikov
MCP (SQL2K)
Leuven, Belgium
|
|
|
|
|
I just reinstalled office2000, installed SP3, and I am still getting this error ("Old format or invalid type library..."). Maybe there are other updates or SP that I should install? I get this error on all computers where I tried to run my application. What is about that data in registry and Office2000 type libraries, how to sync them?
|
|
|
|
|
I've spent all night looking on the net and havent been able to really find any examples of TAPI programming in C#. Does .Net have its own library for handling telephoney? thanks
|
|
|
|
|
The easiest way of calling TAPI from .NET is to use COM interop. You can either use the existing TAPI 3 com interface or roll your own COM interface around TAPI 2.
Michael
Wonder Woman, Wonder Woman.
All the world's waiting for you,
and the power you possess.
In your satin tights,
Fighting for your rights
And the old Red, White and Blue.
|
|
|
|
|
|
Hi,All
I am writting UserControl ,which has property that returns my own collection.
Property looks like this
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content),Description("Get/Set Properties of each Cell")]
public ColumnsCollection AddColumns
{
get{ return clmCollection;}
set{ clmCollection = value;}
}
ColumnsCollection class is derived from CollectionBase(contains collection of ChbColumns objects) which looks like:
public class ColumnsCollection : System.Collections.CollectionBase
{
public ChbColumns this[int index]
{
get{return (ChbColumns)this.InnerList[index];}
set{this.InnerList[index] = value;}
}
public ColumnsCollection()
{
}
public int Add(ChbColumns info)
{
this.InnerList.Add(info);
}
}
ChbColumns class is simple class which contains bool value:
public class ChbColumns
{
private bool m_ShowCheckBox;
public ChbColumns()
{
m_ShowCheckBox = false;
}
public bool ShowCheckBox
{
get{return m_ShowCheckBox;}
set{m_ShowCheckBox = value;}
}
}
Now at design time when i click AddColumns property Collection Editor opens when i add values in it and say ok it doesn't go in set part!(at run time it works)
where should i collect the changes made to this collection(From Collection Editor) at design time?
Thanks and Regards
Tushar.
|
|
|
|
|
Hello to all,
Can you guys help me out i'm a complitly newbie but i want to try and make something with C#.
For now i was undering if you guys could explain if its possible to have a windows form controling a command line program,
what i'm trying to says is i have a prog.exe that only show information that is always printing in the cmd constatly, and i want to be able to see that info in a windows form and possible minimize it to tray, and make him capable of give commands to that console.
Thanks and sorry for the bad english.
|
|
|
|
|
for command line args at start up try something with Enviroment.GetCommandLineArgs();
something like :
<br />
foreach(string jr2 in Environment.GetCommandLineArgs()){ <br />
count++;<br />
string ComandArgs = jr2.ToLower();<br />
byte[] jr = new byte[]{1};<br />
try{<br />
if(count !=1){
switch(jr2.Replace("-",null)){<br />
case "commandarg1":<br />
break;<br />
)
}
)
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
Sorry but has i sad i'm a newbie i didn't understand could you point me to a tutorial.
Thanks
|
|
|
|
|
want me to send you my code ? (program)
The Code Project Is Your Friend...
|
|
|
|
|
Sure, cereal@vizzavi.pt
|
|
|
|
|
i noticed that the default size for des is 8 char's is it possible for me to change this to be anything between 8 and 16 charcters ?
i have tryed just sending a password more then 8 char's and i get a error stating that the password is not a valid size for this algorthim
Jesse M.
The Code Project Is Your Friend...
|
|
|
|
|
The DES algorithm supports only 64 bit (actually, 56 bit but that's a whole other story) keys. If you're wanting stronger encryption look at some of the other crypto providers in the .Net framework:
RC2 supports 128 bit keys
Triple DES supports 192 bit keys (actually not 192 bit..)
Rijndael supports 128, 192 and 256 bit keys.
The reality is that DES is so easy to break you may as well not encrypt your data at all - I would never suggest using it.
Refer to my post in the next thread re: generating a key from a string password if you're not sure on how to do this.
|
|
|
|
|
i implemented it the way that you said..and it works fine but when ever i make the password anything over 8 (including 16) char's i get a IV.Key not valid for block size exception.... code is
DESCryptoServiceProvider des = new DESCryptoServiceProvider(); <br />
byte[] prndKey = new byte[KeySecretString.Length];<br />
PasswordDeriveBytes db = new PasswordDeriveBytes(KeySecretString,prndKey);<br />
byte[] f= db.GetBytes(16);
The Code Project Is Your Friend...
|
|
|
|
|
The idea is to generate a key that's the correct length for the crypto provider -the length of the key has nothing to do with the length of your password string.
Here's some sample code to get you up and running:
SymmetricAlgorithm sa = new DESCryptoServiceProvider();<br />
PasswordDeriveBytes pdb = new PasswordDeriveBytes(pwd, saltBytes);<br />
sa.Key = pdb.GetBytes(sa.LegalKeySizes[0].MaxSize / 8);
SaltBytes is a byte[] array you must supply first. the Salt bytes must be the same for encryption as well as decryption, and are used to help strengthen weak passwords. You may want to a simple fixed array:
byte[] saltBytes = new byte[]{0x00, 0x74, 0xBa etc etc.. };
Or, ideally you would use the RNG service provider the create a random salt for every enceryption, and store the salt value somewhere in the encrypted stream so it could be read when decrypting.
Perhaps I should put together and article on proper cryptography in .Net?
|
|
|
|
|
yeah i think you should i would deffinitly like to read it.
The Code Project Is Your Friend...
|
|
|
|
|
I'm looking at writing an app for storing passwords for the different mailing lists i'm on, with the data encrypted and stored in an xml file. I was wondering if there is a way (in c#) to get a password from a user, and use that as the key to decrypt the data.
I've looked (briefly) through the System.Security.Cryptography namespace but it seems to mostly deal with keys (seperate files), but I would much prefer to input a password and use that as the decryption key - is this possible?
|
|
|
|
|
this is what i use in my program to encrypt hole files. you can possibly use it for yours as well;
inName = full path of the file to be encrypted(this file is only opened and not deleted...you will have to rewrite that part)
outName : output...encrypted file
KeySecretString (the password to encrypt with)
to decrypt the file use the same code but replace :
CryptoStream encStream = new CryptoStream(fout, tdes.CreateEncryptor(tdes.Key, tdes.IV), CryptoStreamMode.Write);
with :
CryptoStream encStream = new CryptoStream(fout, tdes.CreateDecryptor(tdes.Key, tdes.IV), CryptoStreamMode.Write);
further more where you see the code DESCryptoServiceProvider des = new DESCryptoServiceProvider(); you can replace the DES part with RC2 to get RC2 encryption / decryption instead.
Happy Coding...
Jesse M
<br />
private void DecryptData(String inName, String outName, string KeySecretString)<br />
{ <br />
FileStream fin = new FileStream(inName, FileMode.Open, FileAccess.Read);<br />
FileStream fout = new FileStream(outName, FileMode.OpenOrCreate, FileAccess.Write);<br />
fout.SetLength(0);<br />
string FileN = Path.GetFileName(outName);<br />
InformationFile.Text = FileN;<br />
InformationFile.Update();<br />
byte[] bin = new byte[buffersize];
long rdlen = 0;
long totlen = fin.Length;
int len;
DESCryptoServiceProvider tdes = new DESCryptoServiceProvider(); <br />
tdes.IV = ASCIIEncoding.ASCII.GetBytes(KeySecretString); <br />
tdes.Key =ASCIIEncoding.ASCII.GetBytes(KeySecretString);<br />
CryptoStream encStream = new CryptoStream(fout, tdes.CreateDecryptor(tdes.Key, tdes.IV), CryptoStreamMode.Write); <br />
Console.WriteLine("Encrypting...");<br />
while(rdlen < totlen)<br />
{<br />
len = fin.Read(bin, 0, buffersize);<br />
encStream.Write(bin, 0, len);<br />
rdlen = rdlen + len;<br />
Console.WriteLine("{0} bytes processed", rdlen);<br />
<br />
}<br />
fout.Flush();<br />
fin.Flush();<br />
encStream.Flush();<br />
encStream.Close();<br />
fout.Close();<br />
fin.Close();<br />
return;<br />
} <br />
The Code Project Is Your Friend...
|
|
|
|
|
The code looks interesting, I might be able to modify it to what I want. Instead of encrypting the whole file though, all I want to do is encrypt the data in the xml file.
|
|
|
|
|
im not gonna post the code agian...but the code utilized a file stream(inName)....you can save the xml file then encrypt it..but the problem is..for the millisecond that the file is saved on the hd and encryption hasnt got to it it is open. but you might beable to swap the FileStream with the XMLWriter (cant remeber the exsact name for it) try it..and the encryption stream might work fine with a xml stream ..... happy coding.
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
Thanks fror your help - in this instance security isn't that high a priority - I'm only writing this for myself as an experiment
|
|
|
|
|
This is something I see implemented incorrectly time and time again. The *correct* way to derive a key from a string password is using the System.Security.Cryptography.PasswordDeriveBytes method - it's usage is very straight forward.
|
|
|
|
|
Hello all -
I'm trying to write some code to read ID3 tags from mp3 files. ID3 stores information at *the end* of the mp3 file in 128 bytes.
I want to avoid having to loop through the entire file to get the data that I need but it appears that one only can read from the beginning of a file using the .NET I/O classes.
Is it possible to call a version of a Read method with an offset specifying where in a file you want to start reading into a byte array?
eg:
string path = "c:\\downers\\Mancini.mp3";
FileInfo fi = new FileInfo(path);
// the file length
long len = fi.Length;
// subtract 128
long start= len - 128;
int st = (int)start;
Stream fis = File.Open(path,FileMode.Open, FileAccess.Read);
BinaryReader re = new BinaryReader(fis);
byte[] data = new byte[128];
re.Read(data, start, 128); // this won't work, but you get my intuitions...
This doesn't work though; the offset argument in the middle of the read method is an offset in the byte array to start on.
Any ideas? Am I missing something obvious? Otherwise I just have code that loops through the entire file a byte at a time.
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|