Click here to Skip to main content
16,007,443 members
Home / Discussions / C#
   

C#

 
QuestionCan asp.net use C++ DLL through C#? Pin
webdevelopex17-Jan-05 18:05
webdevelopex17-Jan-05 18:05 
AnswerRe: Can asp.net use C++ DLL through C#? Pin
Christian Graus17-Jan-05 21:27
protectorChristian Graus17-Jan-05 21:27 
GeneralRe: Can asp.net use C++ DLL through C#? Pin
webdevelopex17-Jan-05 22:43
webdevelopex17-Jan-05 22:43 
GeneralRe: Can asp.net use C++ DLL through C#? Pin
Nick Parker18-Jan-05 3:45
protectorNick Parker18-Jan-05 3:45 
GeneralRe: Can asp.net use C++ DLL through C#? Pin
Heath Stewart18-Jan-05 5:50
protectorHeath Stewart18-Jan-05 5:50 
GeneralGraphics files stumper... Pin
new_phoenix17-Jan-05 16:12
new_phoenix17-Jan-05 16:12 
GeneralRe: Graphics files stumper... Pin
cobyjone17-Jan-05 16:21
cobyjone17-Jan-05 16:21 
GeneralRe: Graphics files stumper... Pin
new_phoenix24-Jan-05 10:40
new_phoenix24-Jan-05 10:40 
smbecker:

Attempted to utilize your code, but it appears that much of the code is written in C++. For example, the code:

System.IO.FileInfo file = new System.IO.FileInfo(fileName);
if ((file.Attributes & System.IO.FileAttributes.Hidden)!=1)
{
file.Attributes &= System.IO.FileAttributes.Hidden;
}

does not work, because the C# compiler does not understand != 1. More specifically, the error message I get is: "operator '!=' cannot be applied to operands of type 'System.IO.FileAttributes' and 'int'." I would also like to request a couple other clarifications.

First, I suspect that the aforementioned code would act in the following manner. If a file is hidden, then unhide it so that the changes could be made. Make the changes to the file, and then hide it again. The same would be true for the other FileAttributes including System, and ReadOnly.

I really like your thought processes in writing the code, but I do admit that I am at a loss to understand it. I did not come from the C++ environment, and I do not clearly understand the use of the &= , the |= or the !=1 construction in C# nor do I understand the logical AND statment before the !=1.

Therefore, I would really appreciate it if you could write it another way. Also, I am not certain how the code in the if statements work to convert the files to their normal format (ie unhidden, nonsystem, and not readonly) so that changes could be made. Would really appreciate some further elaboration. Confused | :confused: Confused | :confused:

Thanks
New_Phoenix
GeneralRe: Graphics files stumper... Pin
Christian Graus17-Jan-05 17:24
protectorChristian Graus17-Jan-05 17:24 
GeneralRe: Graphics files stumper... Pin
new_phoenix18-Jan-05 6:15
new_phoenix18-Jan-05 6:15 
GeneralRe: Graphics files stumper... Pin
Christian Graus18-Jan-05 8:41
protectorChristian Graus18-Jan-05 8:41 
GeneralRe: Graphics files stumper... Pin
Corinna John17-Jan-05 19:53
Corinna John17-Jan-05 19:53 
GeneralRe: Graphics files stumper... Pin
new_phoenix18-Jan-05 6:31
new_phoenix18-Jan-05 6:31 
GeneralRe: Graphics files stumper... Pin
Skynyrd18-Jan-05 10:25
Skynyrd18-Jan-05 10:25 
GeneralRe: Graphics files stumper... Pin
Corinna John19-Jan-05 19:44
Corinna John19-Jan-05 19:44 
Generalunsorted column schema Pin
paulb17-Jan-05 16:10
paulb17-Jan-05 16:10 
GeneralDetect sender page Pin
ABBASI_RA17-Jan-05 15:35
ABBASI_RA17-Jan-05 15:35 
GeneralRe: Detect sender page Pin
Stefan Troschuetz18-Jan-05 0:21
Stefan Troschuetz18-Jan-05 0:21 
Generaldatagrid lookup field Pin
ABBASI_RA17-Jan-05 15:33
ABBASI_RA17-Jan-05 15:33 
GeneralExcel database for C# Pin
Syasya Mortensen17-Jan-05 14:06
Syasya Mortensen17-Jan-05 14:06 
GeneralRe: Excel database for C# Pin
Christian Graus17-Jan-05 15:55
protectorChristian Graus17-Jan-05 15:55 
GeneralRe: Excel database for C# Pin
Syasya Mortensen17-Jan-05 16:22
Syasya Mortensen17-Jan-05 16:22 
GeneralRe: Excel database for C# Pin
Rob Graham17-Jan-05 17:02
Rob Graham17-Jan-05 17:02 
GeneralRe: Excel database for C# Pin
Syasya Mortensen25-Jan-05 13:59
Syasya Mortensen25-Jan-05 13:59 
GeneralNovell C# LDAP - Thread does not own the semaphore exception Pin
Edbert P17-Jan-05 12:33
Edbert P17-Jan-05 12:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.