|
pandit84 wrote: No I have not choose the Run As Administrator .
please try that.
|
|
|
|
|
I use wmi to enumerate all the services running from the system over a network, but in some machines it returns all the services running in them and in some machines it throws error, which i don't understand . Is there any security rights involved or some other type of constraints. Please help
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
You will need the SC_MANAGER_ENUMERATE_SERVICE right for a particular service manager database.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi to all, long time no see.
Recently I had to make some modification to my app. When I was done I've tried to rebuild the project but I've got numerous errors like:
- "d:\program files\microsoft platform sdk for windows server 2003 r2\include\shtypes.h(102) : error C2011: '_SHITEMID' : 'struct' type redefinition",
- "d:\program files\microsoft platform sdk for windows server 2003 r2\include\shtypes.h(120) : error C2011: '_ITEMIDLIST' : 'struct' type redefinition",
and so on ....
Now it may be I've downloaded other platforms or so could this be it or...?
How can I fix this?
Thanks in advanse.
P.S.
VS6, WinXP SP3
|
|
|
|
|
Solved!
Re arranging some directories in Tool->Options->Directories.
Bye
|
|
|
|
|
Hai!
I am using the following sorce code to display JPEG images in my Win CE application developed using eVC++ for a pocket PC device.
http://www.pocketpcdn.com/articles/jpeglib.html
Actually i get a bitmap handle by using the above source code, i display this bitmap handle on my picture control.
Actually i am displaying the image with its original size, but i am not able to see the whole image as the size of screen of my WIN CE device is very small, so i want to display compressed image or display the image after reducing its size?
Is there any function to do it?
Thanks!
|
|
|
|
|
My DLL [^] performs such task. You may use, as well, the GDI+ for the purpose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Also StretchBlt[^], which has the advantage of definitely being available of any WInCE build, but the disadvantage of using a lousy resampling algorithm.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have to use skip list to store ~109000 words from a text file.
Here's the code (I'm using Visual C++ 2008):
Struct of the node:
struct SkipNode
{
SkipNode ** forward;
CString mots;
CString longe;
CString pos;
};
Make a new node:
SkipNode* make_node(int level, CString mots, CString pos, CString longe)
{
SkipNode *sn;
sn=new SkipNode;
sn->forward = (SkipNode**)calloc(level + 1, sizeof(SkipNode *));
sn->mots = mots;
sn->pos = pos;
sn->longe = longe;
sn->level=level;
return sn;
}
Insert a node:
void insert(SkipList* ss, CString value, CString pos, CString longe)
{
int i;
SkipNode* x = ss->head;
SkipNode* update[MAX_LEVEL + 1];
memset(update, 0, MAX_LEVEL + 1);
for(i = ss->level; i >= 0; i--)
{
while(x->forward[i] != NULL && x->forward[i]->mots < value)
{
x = x->forward[i];
}
update[i] = x;
}
x = x->forward[0];
if((x!=NULL)&&(x->mots!=value)||(x==NULL))
{
int lvl = random_level();
if (lvl > ss->level)
{
for(i = ss->level + 1; i <= lvl; i++)
{
update[i] = ss->head;
}
ss->level = lvl;
}
x = make_node(lvl, value, pos, longe);
for(i = 0; i <= lvl; i++)
{
x->forward[i] = update[i]->forward[i];
update[i]->forward[i] = x;
}
}
}
My MAX_LEVEL = 17 (log109000).
I read that skip list takes less time to insert a node than some other data structure (O(log n)). So I wonder why I need ~3 minutes to make the skip list above. And when I stop debugging, the program is still running!? I've just started studying programming, please help me!
|
|
|
|
|
Risa Harada wrote: O(log n)
What that defines is how the insertion time grows with n. It does not say that the skip list insertion time is less than the time taken to insert an item into other data structures.
Risa Harada wrote: void insert(SkipList* ss, CString value, CString pos, CString longe)
Risa Harada wrote: SkipNode* make_node(int level, CString mots, CString pos, CString longe)
Pass things like CStrings BY REFERENCE. In this case, by const reference:
void insert(SkipList* ss, const CString & value, const CString & pos, const CString & longe)
SkipNode* make_node(int level, const CString & mots, const CString & pos, const CString & longe)
Other data structures probably have better characteristics for this
- vectors are nice because they've been optimised - it's generally reckoned that if you're going to be reading from and searching in your data structure a lot, you're best off using a vector, sorting it and using std::lower_bound to search.
- std::map or std::set has probably been better optimised
- A trie[^] or alternatively a ternary search tree[^] is generally reckoned to be good for storing words
HTH
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank you so much I'll try it out. My professor asked me to use skip list to make a dictionary, so I don't have any other choice.
|
|
|
|
|
Hi,
I am getting a string from the server , and doing following operation to get the BYTE format of that
string key;
This variable contains the value, which I received from server.
BYTE key1[24] = {0};
DWORD dwBase64Size;
CryptStringToBinary(key,0,CRYPT_STRING_BASE64,0,&dwBase64Size,0,0);
if (dwBase64Size>24)
return "";
CryptStringToBinary(key,0,CRYPT_STRING_BASE64,key1,&dwBase64Size,0,0);
This function is working fine for WINXP, but fails on Win2K, as it does not allow the dll to get registered.
In the same way the prolem is with CryptBinaryToString also.
can you suggest a alternate of this code, which works on WIN2K.
Thanks
Vineet Kumar Singhal
Sr.Software Engineer
Mumbai
Tough Time Never last, but Tough People do.
|
|
|
|
|
Why don't you try to build your own [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I was playing with edit control,
after entering a number
Accidentally i pressed CTRL + SHIFT keys.
This sent the text to right align..
How to over come this..
|
|
|
|
|
Goto Edit box Properties select styles. you can see a combo box. change it per your needs.
|
|
|
|
|
Keeping the property to align left.
On debugging if we press ctrl+shift together,
the text will shift to right align.
|
|
|
|
|
are you asking a question?
If its a question, then i don't think if you press SHIFT + CTRL during debug the text will shift to right align
|
|
|
|
|
It will shift..
try ur self
|
|
|
|
|
Dear,
Below are the steps i followed to create the problem.
1. Created the simple dialog based app. And placed the editbox control in dialog.
2. style align property of the editbox is set as left.
3. Run the app in debug mode.
4. enter some text in edit box.
5. press ctrl + shift keys as u mentioned . The text remains at the same place ie left . ie no shift .
Hope u have tried it in VC 6.0 and if there is any change in our approach kindly reply back.
|
|
|
|
|
your approach is correct
if u have set the property to left align then.
while debugging you need to press right side ctrl+shift(near to arrow keys)
this will surely shifts the cursor to right side.
once it is in right side if u press left side ctrl+shift
it comes to left..
Plz try again and reply
|
|
|
|
|
hallo, how can i blind out Effects, color, Script, underline , struck through in CFontDialog?
i used this code but it did not work:
CFontDiaolg m_cfdlg;
m_cfdlg.m_nFlags |= ~CF_EFFECTS; // did not help
m_cfdlg.m_cf.Flags |= CF_NOSCRIPTSEL;// only disabled but not blind out
|
|
|
|
|
It should be
m_cfdlg.m_nFlags &= ~CF_EFFECTS;
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
thanks for the answer but it did not work.
|
|
|
|
|
The fact that it did not work could be related to the flag not being the right one.
The example shows the following.
Assume the m_nFlags variable currently contains the value 0x99999999.
Further assume the CF_EFFECTS field is the value 1.
To remove CF_EFFECTS from the m_nFlags variable,
Do a bitwise NOT of the CF_EFFECTS.
~CF_EFFECTS will give the value 0xFFFFFFFE.
AND ing m_nFlags and ~CF_EFFECTS will now give you 0x99999998, which is then re-assigned back to m_nFlags.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks alot ist worke, but i still have another problem with the script element:
m_cfdlg.m_cf.Flags |= CF_NOSCRIPTSEL; // Disabled but not blind out the script element
m_cfdlg.m_cf .Flags &= ~CF_SHOWHELP; // Disabled the Help Button, but the Question mark in the Dialog still showed.
|
|
|
|