|
Are you able to logon to IPC$ of the server of which you want to access the registry ?
suhredayan There is no spoon.
|
|
|
|
|
i am able to log to ipc. I am also able to connect to remote registry but it remains in read-only mode.
if tried to connect using regconnectregistry api, it fails. do i need to specify any trust relationships or forest levels for this to be working?
|
|
|
|
|
Hi,
I'm trying to recreate the Polygon API with filling. I'm using Polyline. Is there a filling algorithm I can use to do the exact same thing that Polygon does?
Thanks
|
|
|
|
|
Books:
Michael Abrash Graphics Programming. (best choice)
Foiley and Van Dam. (lots of info.)
Graphics Gems. (may be)
You should be able to find an implimentaion at a graphics or gaming sight.
http://sourceforge.net (a good place to look for libraries and applications.)
If you search for "Michael Abrash" or "Foiley and Van Dam" you should find some hits.
Well I hope that helps narrows the search.
Good luck!
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
I'm currently developing a context menu shell extension. I'm trying to create something similar to the Windows Picture and Fax viewer in that it is the default action for the specified filetype. Google assisted me in finding the MayChangeDefaultMenu registry tweak, so doubleclicking a hooked file fires my extension, however, when a file is executed with ShellExecute/Ex, it isn't. Is there a way to set my extension as the *official* default action so that ShellExecute/Ex will fire my extension?
One method I can think of doing would be to register a normal file command via and set that as the default, then somehow make that command's menu entry invisible so that it exists only for the purpose of being the default action. Possible?
Any other suggestions are welcome of course...
|
|
|
|
|
When I create an application. Do the files my app uses (such as files the user can load) have to have an extension of only 3 characters? If so, how do I determine what extensions are already in use to ensure that my extensions are unique and have their own icon?
|
|
|
|
|
JKallen wrote:
Do the files my app uses (such as files the user can load) have to have an extension of only 3 characters?
three is typical, but you can have extensions of any length you like. ex: .JS, .CONFIG, .FOO.
JKallen wrote:
If so, how do I determine what extensions are already in use to ensure that my extensions are unique and have their own icon?
strictly speaking, you can't. nobody keeps an authoratative list of file extensions. the best you can do is search the web (and your system registry) to see if you can find a match.
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
Thanks. that's what i figured. How do I have the OS associate an extenion with an icon? Secondly what happens if the extension already exists on the PC via installation of another app?
|
|
|
|
|
hi,
if you guys could tell me how do i get the project path or the handle tht hold it . it would be gr8.
thanks for the help
Chintan
|
|
|
|
|
Are you looking to get the path of you exe? If so, use getmodulefilename().
suhredayan There is no spoon.
|
|
|
|
|
I cannot create a working connection. I need help. Here is my source:
#include <winsock.h>
#include <string>
#include <sstream>
#include <iostream>
using namespace std;
string itos(int x){
ostringstream sStream;
sStream<<x<<flush;
return(sstream.str());
}
int="" main(int="" argc,="" char="" *argv[]){
="" fills="" array="" with="" ips
="" string="" iparray[255];
="" subnetarray[1]="192.168.1" ;
="" int="" rangestart,rangeend;
="" rangestart="5;
" rangeend="5;
" index="0;
" for(int="" x="rangeStart;x<=rangeEnd;x++){
" iparray[index]="subnetArray[0]+".";
" tmp="itos(x);
" iparray[index]+="tmp;
" index++;
="" }
="" wsa="" startup
="" wsadata="" wsadata;
="" if(wsastartup(makeword(1,1),&wsadata)!="0){
" cout<<"wsastartup="" failed!\n";
="" system("pause");
="" return="" exit_success;
=""
="" socketdescriptor;
="" socketdescriptor="socket(AF_INET,SOCK_STREAM,0);
" if(socketdescriptor<0){
="" cout<<"socket="" creation="" serverport="20100;
" struct="" hostent="" *hostinfo;
="" sockaddr_in="" serveraddress;
="" ip[20];
="" strcpy(&ip[0],iparray[index].c_str());
="" cout<<ip;
="" hostinfo="gethostbyname(IP);
" serveraddress.sin_family="hostInfo-">h_addrtype;
memcpy((char *)&serverAddress.sin_addr.s_addr,hostInfo->h_addr_list[0],hostInfo->h_length);
serverAddress.sin_port=htons(serverPort);
//cout<<endl<<endl<<serveraddress.sin_addr.s_addr;
if(connect(socketdescriptor,(struct="" sockaddr*)&serveraddress,sizeof(struct="" sockaddr))="=-1){
" cout<<"="" not="" connected"<<endl;
="" }
="" else{
=""
="" system("pause");
="" return="" exit_success;
}
and="" the="" other:
#include="" <winsock.h="">
#include <iostream>
using namespace std;
int main(int argc, char *argv[]){
//wsa startup
WSADATA wsaData;
if(WSAStartup(MAKEWORD(1,1),&wsaData)!=0){
cout<<"WSAStartup failed!\n";
system("PAUSE");
return EXIT_SUCCESS;
}
int socketDescriptor;
socketDescriptor=socket(AF_INET,SOCK_STREAM,0);
if(socketDescriptor<0){
cout<<"Socket creation failed!\n";
system("PAUSE");
return EXIT_SUCCESS;
}
struct sockaddr_in myAddr;
myAddr.sin_family=AF_INET;
int serverPort=420100;
myAddr.sin_port=htons(serverPort);
char myIP[16];
gethostname(myIP,16);
myAddr.sin_addr.s_addr=inet_addr(myIP);
cout<<myip<<endl;
="" struct="" hostent="" *h;
="" h="gethostbyname(myIP);
" cout<<"hostname:="" "<<h-="">h_name<<endl;
cout<<"ip:="" "<<inet_ntoa(*((struct="" in_addr*)h-="">h_addr))<
|
|
|
|
|
Well, I haven't actually tried to validate your code yet, but it looks like you are trying to listen on port 420100 on the server app (which is out of the range of acceptable ports, it's over 65535), and the client is trying to connect to port 20100. You need to connect to the port that's being listened on. I'm assuming it's just a typeo in your code that you put 420100 instead of 20100 on the server side.
-- Rocky Dean Pulley
|
|
|
|
|
He, he. What a dumb mistake by me. But I still get the same problem. I cannot get the two to connect, even now that I am listening and connecting using the same port. Oh, I used Dev-C++ for compiling if you wanted to give it a go.
|
|
|
|
|
i need a way that i can search the harddrive for a paticular file type
|
|
|
|
|
use findfirstfile() and findnextfile() to search for a file. But this requires drive letters.
To get the drive letters at the runtime use GetLogicalDriveStrings/ GetLogicalDrives.
suhredayan There is no spoon.
|
|
|
|
|
I am using some code that is generated by a compiler generator (ANTLR[^]) and the generated code has a number of places wher it uses #line. I notice that I can comment this out and it still compiles/builds/runs. Why would anyone want to use #line ?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
For macros and inline includes, it is real handy. By using #Line, you can reference the line of the include file, rather than the source file that the macro has been inserted into.
onwards and upwards...
|
|
|
|
|
#line tells the compiler/preprocessor that the next line in the source file should be treated as though it came from another file/line. In the case of antlr (and lex and yacc and other compiler compilers) they use #line wherever they copy code from your source file into the output file, in the case of the rule actions. This is so if there is an error in your code, the compiler will indicate where in your source file the error was, rather than the line in the generated file, which probably means nothing to you.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Is there a way to debug another process, that the process I'm debugging has done a CreateProcess() call for. I can't figure out how to load the project for the other process into the workspace for the project that I'm debugging. I'm using version 6 of Visual Studio. Thanks.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
|
Thanks Chris.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
A lot of people know class CHtmlView. I had found pretty functions
FIndText() and FindText2(), written by Marc Richarme (http://www.codeproject.com/miscctrl/CHtmlView_Search/CHtmlView_Search_demo.zip),
that allow to find text on loaded(!) web-page.
Now I'm making project. One of main its functions is finding text on several(!) pages.
I do not know any other way to do it excepting using function FindText2() ( or FindText() ).
Actually, it is possible to find text in several web-pages, using, for example, FindText2() for every page separately.
But this function can't be applied until web-document isn't loaded.
So, I decided to organize cycle. Each page will be loaded in every other cycle.
I mean something like this (in abstraction):
<br />
<br />
for (int i=0; i<number_of_pages; i++)<br />
{<br />
...<br />
this->Navigate2( _urls[i], NULL, NULL );
....<br />
...<br />
}<br />
<br />
My problem is concluded in follow: the FindText2() function in my code called every time before new web-page will be loaded
completely. That's why FindText2() works with old page-url, finding text on it
Having poor English level, I repeat: FindText2() forestalls loading page.
So, I would like to know have can I define when my page is loaded, and then I'll call for FindText2().
Thanks in advance, I tried to explaine my problem very exactly.
|
|
|
|
|
|
I'v just tried. But have no success.
I decided to search for text using direct reading from file. Maybe you know, is there any class to organize searching in *.txt file for concrete text?
Thank you for answering
|
|
|
|
|
I have a constants.h file that I would like to use to store constants and such.
When I include the file in a class in my project I keep getting Link Error:2005: "already defined in" errors when I try to declare a string constant in the constant.h file.
How do I create global string constants that I can use througout my app?
// constants.h: defines constants to be used througout application.
//
//////////////////////////////////////////////////////////////////////
#if !defined(APP_CONSTANTS_0209051212)
#define APP_CONSTANTS_0209051212
//no problems here
const APP_PATH_STRING_LENGTH = 255;
//link errors when using these
char* app_data_path = "data\\";
char* app_charts_path = "c:\\CHARTS\\";
#endif // !defined(APP_CONSTANTS_0209051212)
Kevin Shaffer
kshaff03@msn.com
|
|
|
|