|
Visual SourceSafe integrates directly with Visual Studio. There is a Project/Source Control menu option where the standard check in/check out options are available. Does that not work for you?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
|
Hello,
This is kind of a hard question to ask but I have been trying to figure it out for days and I am still having problems...
I have an application that uses CHtmlView, I am trying to login to a website, the web site puts a cookie down on the machine so if you were to close your browser and re-open it you would still be logged in. So I wrote a login dialog (part of the same browser SDI) that asks for the user name and password.. I use CInternetSession to login to the web site.. this works fine (after I pass the login I grab the HTML and parse it for the "welcome" message so I know I am logged in). Then right after the login I show my CHtmlView and surf to the web site but it doesn't show me as logged in. Some times I get a error msg on the website stating that my browser is blocking cookies (I know it's not blocking them but I can't figure it out)
Any ideas?
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi all,
Im currently developing a MFC-program in Visual C++ 6.0 that will identifiy a user through his/hers fingerprint.
The C++ program needs to be launched from another program with VBA support (so Im currently testing it in MS Excel)
The C++ program also needs to return a textstring with the username (or ID or some kind of text like "George Lucas")
With my very basic skills in VBScript I have manged to run the C++ program. But is it possible to get something back from the program ??
Im guessing that the C++ program might need some kind of method to communicate back to the VB Script ... ?
Im would be very thankful for any kind of help !
/ daniel
|
|
|
|
|
I'd be tempted to write the app as a COM DLL, so that it can be launched as an in-proc, supporting automation. You could expose a method
HRESULT Scan([out] BSTR* userid)
that did the scan, any lookup, and returned an appropriate username (or a null string on failure).
That would make the communication with the program much simpler.
Steve S
|
|
|
|
|
Thanks for your reply !
The app is like 99% complete though and it's pretty complex with a lot of dialogs functions. Could it be converted to a COM DLL in any easy way ?? (I have very limited experience with COM-programming and creating DLL's)
And if not .. could there be any other way ?
|
|
|
|
|
I'm trying to use CORBA, but i don't really understand all the code generated, and the way it proceeds the RPC (if RPC there is...).
Can anyone help please?
ps: if you need more precisions, no problem, just ask me what you want to know
TOXCCT
|
|
|
|
|
Hi!
Having problem with my program. I'm looking up the device, but it will not be found. I'm trying to different ways. I know I have a device. With Tcpdump I can sniff packets at eth0. But my own program do not work.
Does anyone know why it do not work?
Thanksful for your help,
Stefan
My code:
#include <stdio.h>
#include <pcap.h>
int main()
{
char *dev, *device, errbuf[PCAP_ERRBUF_SIZE];
pcap_t *kkk;
dev = pcap_lookupdev(errbuf);
kkk = pcap_open_live(device, 128, 0, 100, errbuf);
printf("Device1: %s\n", dev);
printf("Device2: %s\n", kkk);
return 0;
}
|
|
|
|
|
sorry, can't help you man, you're too less precise
please
- give more details (like what you excpect exactly, and what it does instead),
- be more "readable" (colors, indentations, useful & logical variable names...)
- be careful to the < and > html tags delimiters when you write a C header... (your #include don't appear)
i wish i'll be able to help you, but you have to help me too...
ps:what is pcap ?
TOXCCT
|
|
|
|
|
Hi,
Does anyone know the function that allows a running application to be closed and re-started?
Is it possible to run this function from within the application I'd like restarted?
Thanks in advance
|
|
|
|
|
In a word, no. If you are calling it from your own application, you could call GetModuleFileName to get your EXE name, then CreateProcess to reexecute you, then PostQuitMessage to shut yourself down.
If you want to do it to someone else, then you will need to find the window that you wish to kill, get the related process name for that window, post a WM_CLOSE to that window, or a WM_QUIT to that window's thread, then restart the app.
There isn't, AFAIK, a function that does all this for you.
|
|
|
|
|
Thanks for the reply.
Decided to go antoher route. Just about to implement and test.
|
|
|
|
|
Hi All
Does any one, know of a way to detect if a user is logged to his/her
pc with administrative rights ?
thanks
Simon
|
|
|
|
|
Like this:
BOOL IsAdministrator(void)
{
BOOL fRet = TRUE;
HANDLE hProcess = INVALID_HANDLE_VALUE;
HANDLE hAccessToken = INVALID_HANDLE_VALUE;
UCHAR InfoBuffer[1024] = {0};
PTOKEN_GROUPS ptgGroups = (PTOKEN_GROUPS)InfoBuffer;
DWORD dwInfoBufferSize = 0;
PSID psidAdministrators = NULL;
SID_IDENTIFIER_AUTHORITY siaNtAuthority = SECURITY_NT_AUTHORITY;
UINT x = 0;
hProcess = GetCurrentProcess();
if(!OpenProcessToken(hProcess,TOKEN_READ,&hAccessToken))
return(FALSE);
if(!GetTokenInformation( hAccessToken,TokenGroups, InfoBuffer, 1024, &dwInfoBufferSize))
return(FALSE);
fRet = AllocateAndInitializeSid(
&siaNtAuthority, 2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0, &psidAdministrators);
if (!fRet)
return(FALSE);
for(x = 0; x < ptgGroups->GroupCount; x++)
{
if(EqualSid(psidAdministrators, ptgGroups->Groups[x].Sid))
{
FreeSid(psidAdministrators);
return(TRUE);
}
}
FreeSid(psidAdministrators);
return(FALSE);
}
Which will return true if the current user is a member of BUILTIN\Adminstrators group or false otherwise
|
|
|
|
|
IsUserAnAdmin[^] will test whether the user is a member of the Administrators group. This is one of the Settlement Program Interfaces[^], so you may need to use LoadLibrary and GetProcAddress to use it.
However, this only works well in the default environment. An administrator may have assigned rights to other user accounts or groups to give them raised privileges. A better way is simply to try whatever operation needs to be performed, and handle any access-denied errors that occur.
|
|
|
|
|
|
Maybe it was only ever exported by ordinal.
The Settlement Program is something that came out of the anti-trust suit: this is one of the 'revealed' APIs. If you get hold of a recent Platform SDK (December 2002 or later, currently at February 2003), you'll find this function in ShlObj.h. I assume that the appropriate import library (shell32.lib?) contains the necessary import to call the function.
I stand by my earlier statement that this is the wrong way to do it anyway.
|
|
|
|
|
Hello all:
can any one please help me how can I get HGLOBAL for the data contained in CRichEditCtrl ,I've to strore the data as BLOB and the class i am using for BLOB need HGLOBAL for that data..please help me in this context...
Muhammad Ahmed
ahmed
|
|
|
|
|
Use CRichEditCtrl::StreamOut() and write your own stream callback function, in that you copy raw bits from rich edit control to HGLOBAL .
See the EDITSTREAM and CRichEditCtrl documentation for details.
Robert-Antonio
|
|
|
|
|
thanks alot brother..you solved the problem almost 95 %
Regards
Muhammad Ahmed
ahmed
|
|
|
|
|
the callback function is called, passing the data in segments, so should i allocate memory on the heap for each call and the integrate the whole data in a newly allocated memory or is there a way to keep appending data to the buffer allocated only once....(or is there a way to find in advance how much buffer we should have?)
thanks
ahmed
|
|
|
|
|
The callback function takes the cb parameter, which contains required size of CRichEditCtrl data. You can grow the HGLOBAL memory with GlobalRealloc .
Robert-Antonio
|
|
|
|
|
hello every body
I want to know how can i end an sdi application like what we do in the Dialog application by calling CDialog::OnOk()
Best Regards
|
|
|
|
|
I believe the best practice is to post a WM_CLOSE message to your CFrameWnd-derived object. Something like that: AfxGetMainWnd()->SendMessage(WM_CLOSE);
|
|
|
|
|
thank u for it is working now
Best Regards
|
|
|
|