Hi I want to open a specific folder (e.g. "D:\test\") with windows explorer using C#.Net. What should I do? Thanks in advance
MozhdehQeraati
Posts
-
open a specific folder -
Timeout expiredHi I have written a project in C#.Net 2005 that is connected to SQL Server 2000. The SQL Server Engine is on a server and there are three clients connecting to this server. The application is running on clients. Each minute many requests such as select, insert and ... are sent to the server, through transactions. The default timeout of the SQL Server has not been changed. After 200 requests, for example (the number is random, sometimes more, sometimes less), an error occurs which is: "Timeout expired, the timeout period elapsed prior to the completion of the operation or the server is not responding" With no changes in the server name, firewall, network protocol or whatever, the next request after this error, will be sent correctly and the response will be got correctly. Can anyone help me to solve this problem? Thanks in advance
-
TransactionsHello every body! I am writing a C# application using SQL Server as a database. I run transactions on some tables of my database. I want to write something like a trigger for example, that if a transaction rollbacks, for whatever reason, the database itself tries it one more time and then send the response to the application. Is it possible or not? If yes, how can I do this? Thanks in advance
-
copy specified length of array char^ to char* [modified]Hi everybody I have a dll in C++ which I want to use it in C# later. I want to have a Char array in the interface of a function. So the interface is like: function(array char^ chArr) I have a char* "ch" it in function body which I want to copy a specified length of it in chArr.I wrote a code like this: memcpy(chArr,(const char*)ch,length) But it can not convert from array^ to void* (the first parameter of memcpy is void*). What should I do? Thnx in advance
modified on Sunday, August 30, 2009 1:13 AM
-
LNK1107I did it. I added the .h and .cpp file in the solution explorer and build the project. but it doesn't work.
-
LNK1107of course I did. I added both the .h and the .cpp file in the solution explorer.
-
LNK1107Hi everybody I am writing a dll in C++.Net. I had a .h and .cpp file in visual C6.0 and I want to use it here,but there is no lib. First, I set the paths in project properties, but because there is no lib file, I only set the .h file path there. But while compiling there were two LNK errors: LNK2028 and LNK2019. I add it manually in the "Header files" section and "Source Files" section. But there is an error like this while compiling: LNK1107: Invalid or corrupt file, cannot read at 0x306 I also include it in my code. What's wrong? Would you please help me? Thanks in advance
-
HRESULT:0x8007007EThanks. I use dependency walker and I found it. There were 2 dlls missing: msvcr80.dll msvcrd80.dll I copied them in the exe folder and the problem was solved. But I am surprised that once I ran the program, a folder was built in WINDOWS folder and the dlls were copied there. So there is no need to those dlls in the exe folder. I mean I delete the dlls in the exe folder and the program still works fine. Why this happens and what should I do when I want to release the application? Thanks
-
HRESULT:0x8007007EHi I am using a C lib and its corresponding header file in my C++ class library project. After a lot of linkage errors I could finally build the project. I want to use this C++ dll in a C# application. There is no debug error, but there is a runtime error like this: The specified module could not be found. HRESULT: 0x8007007E Could anyone please help me? Thanks in advance
-
linkage errorI finally could solve the problem by changing "\properties\linker\input\Additional Dependences\". It compiles well and there is no linkage error anymore but I get another error while running the project: "The specified module could not be found (Exception from HRESULT:0x8007007E)" The error happens in Application.Run in program.cs, but not at the time of loading the form, but it happens when I want to make an object from my class, even when I don't use that specific function. Besides my dll is in Visual C++.Net and I'm calling it from C#.Net. Could you please help me? Thanks in advance
-
linkage errorI change the header file from: extern "C" AFX_EXT_API Reader * CreateReader(); to: extern "C" AFX_EXT_API Reader * __stdcall CreateReader(); and also: extern "C" AFX_EXT_API Reader * __cdecl CreateReader(); but it doesn't work.The same errors occur. Should I do anything while calling the function? I include the header file and call the function as a usual ones.
modified on Tuesday, August 18, 2009 7:04 AM
-
linkage errorYou mean when I want to call it, for example in one function in my own application I use "__cdecl" before calling? like this?: Reader* m_pReader=__cdecl CreateReader();
-
linkage errorI don't have any access to the lib file. I only use it. You mean I only change it in the header file?! Is it possible? Besides there is no __declspec(dllexport). It is declared exactly as I wrote: extern "C" AFX_EXT_API Reader* CreateReader(); Besides I use it with /clr. Thanks
modified on Tuesday, August 18, 2009 6:08 AM
-
linkage errorI have a lib and its corresponding header file in C or C++ that I want to use it in Visual C++.net. The header file has a structure like this: Reader.h: class AFX_EXT_CLASS Reader { . . . }; extern "C" AFX_EXT_API Reader * CreateReader(); There is no problem using the class but I can't use the CreateReader() function. There are 2 linkage errors: LNK2028, LNK2019. Can you help me using this function please? Thanks in advance
-
LNK errors while using an "extern "C"" functionwould you please elaborate a little bit more or send me an article with examples? Thanks a lot
-
LNK errors while using an "extern "C"" functionI am implementing a C++.Net Class Library.(I want to use it in C#.Net later) I am using an MFC C++ header file and its corresponding lib file in that class library. I set the path for header file and lib file in the project properties. In that header file there is a class which I have no problem using it. But there is an "extern "C"" function which I have some problem with it. When I call it in my code, there are two link errors while compiling: error LNK2028 error LNK2019 Please help me to use this function. I'd appreciate it. Thanks in advance
-
abstract classHi I am a new comer in C++. I have an MFC application that using some header files and libraries. I set the 'additional library directories' and 'additional include directories' in project settings. But whenever I want to make an instance of one of those classes I get this error: error C2259: cannot instantiate abstract class due to the following members: .... It is wierd as it works in another project same as this one, and there are some other classes in the lib files as this class, but the error doesn't occur in those conditions. I know the concept of abstract class. Please help me in advanse. Thanks
-
SQL Server, client-server connectionI use a connection via a client machine, to SQL server which is on server. These two machines are in a workgroup. whenever I restart the client machine, I have to first, connect to my server through windows address bar, and then the connection via my code (C# 2005) can be established. If I restart my program any time after this, it can connect to SQL Server. But when I restart the client machine, this happens again. I use the appropriate network library. Would you please let me know why this happens and what should I do? (the logon to the client machine is done locally)
-
IISI use a Microsoft IIS in order to getting a service via client-server connection. but after some time passes, the service becomes down and I have to start it again. Would u please help me why and what should I do. Thanks in advance!
-
specific column font in a datagridHi, I want to change the font of a specific column in C#.Net 2003 while the rest ramains in the default font. For example I want column 11 has the font "Times ..." while others have the font "Arial". How should I do this? Thanks in advance.