Click here to Skip to main content
14,662,440 members
Home » Discussions » C#
   

C#

 
AnswerRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
Coding 10114-Jun-09 4:19
MemberCoding 10114-Jun-09 4:19 
GeneralRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
CoderForEver15-Jun-09 7:27
MemberCoderForEver15-Jun-09 7:27 
AnswerRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
OriginalGriff14-Jun-09 4:36
mveOriginalGriff14-Jun-09 4:36 
GeneralRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
Dave Kreskowiak14-Jun-09 4:51
mveDave Kreskowiak14-Jun-09 4:51 
AnswerRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
Luc Pattyn14-Jun-09 5:24
sitebuilderLuc Pattyn14-Jun-09 5:24 
GeneralRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
CoderForEver15-Jun-09 7:26
MemberCoderForEver15-Jun-09 7:26 
GeneralRe: how could i make my program to be opened only one instance @ a time when installed to my buyer's computer Pin
Luc Pattyn15-Jun-09 8:17
sitebuilderLuc Pattyn15-Jun-09 8:17 
QuestionProblem connecting a network drive in C# through windows service Pin
Praveen Raghuvanshi14-Jun-09 0:52
professionalPraveen Raghuvanshi14-Jun-09 0:52 
I have a requirement to connect a network drive, once it gets disconnected.

I am using WNetAddConnection2A() API of mpr.dll. It works fine for a console/windows application.
When I tried to use the same code in windows service, it’s unable to connect the drive.
WNetAddConnection2A() returns an int value. A non zero value is a failure and zero is a success.

In windows service it returns zero, still drive does not get mapped/connected.

int result = WNetAddConnection2A(n, password, username, dwFlags);

In ServiceProcessInstaller we have 4 types of Account. I tried with all of them and got the below return value from WNetAddConnection2A().

1- LocalService : 1312
2- NetworkService : 0 (Success, Still drive is not mapped).
3- LocalSystem : 1312
4- User : 0 (Success, Still drive is not mapped).

Error 1312: A specified logon session does not exist. It may already have been terminated.

Any help in this regard is appreciated. Also would like to know what kind of Account should I use.

Praveen Raghuvanshi
Software Engineer,
India.

AnswerRe: Problem connecting a network drive in C# through windows service Pin
Dave Kreskowiak14-Jun-09 5:07
mveDave Kreskowiak14-Jun-09 5:07 
QuestionBlueTooth Pin
ellllllllie14-Jun-09 0:36
Memberellllllllie14-Jun-09 0:36 
AnswerRe: BlueTooth Pin
Henry Minute14-Jun-09 1:07
MemberHenry Minute14-Jun-09 1:07 
GeneralRe: BlueTooth Pin
ellllllllie14-Jun-09 1:33
Memberellllllllie14-Jun-09 1:33 
AnswerRe: BlueTooth Pin
lw@zi 14-Jun-09 18:14
professional lw@zi 14-Jun-09 18:14 
Questionwhat does a adobe acrobat plugin does while displaying PDF file in IE? Pin
svt gdwl14-Jun-09 0:11
Membersvt gdwl14-Jun-09 0:11 
QuestionI am having some problems serializing an object... [modified] Pin
Member 408659613-Jun-09 23:39
MemberMember 408659613-Jun-09 23:39 
AnswerRe: I am having some problems serializing an object... Pin
Dave Kreskowiak14-Jun-09 5:04
mveDave Kreskowiak14-Jun-09 5:04 
Questionabout BitVector32 Pin
Seraph_summer13-Jun-09 23:23
MemberSeraph_summer13-Jun-09 23:23 
AnswerRe: about BitVector32 Pin
Henry Minute13-Jun-09 23:41
MemberHenry Minute13-Jun-09 23:41 
AnswerRe: about BitVector32 Pin
Guffa13-Jun-09 23:46
MemberGuffa13-Jun-09 23:46 
QuestionQuestion For List Generics Pin
Sider8913-Jun-09 22:54
MemberSider8913-Jun-09 22:54 
AnswerRe: Question For List Generics Pin
0x3c013-Jun-09 23:22
Member0x3c013-Jun-09 23:22 
GeneralRe: Question For List Generics Pin
Sider8913-Jun-09 23:36
MemberSider8913-Jun-09 23:36 
GeneralRe: Question For List Generics Pin
0x3c014-Jun-09 0:57
Member0x3c014-Jun-09 0:57 
GeneralRe: Question For List Generics Pin
Sider8914-Jun-09 1:04
MemberSider8914-Jun-09 1:04 
GeneralRe: Question For List Generics Pin
0x3c014-Jun-09 1:36
Member0x3c014-Jun-09 1:36 

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.