|
might be you have to include this line of code in your application :-
#pragma comment(lib,"ntquery.lib")
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Why the CreateIFilter signature of the linker error message doesn't match the one of the code posted?
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
|
|
|
|
|
Hi All,
i Want to know that how can save the List of ListCtrl in MS-Access Database?
please help me fo this ,
i m waiting for ur helpful answers.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
The fact that your data is coming from a list control is irrelevant. The more general question is, "How can I save string data to an Access database?" Goggle should provide you with more than enough information.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i m able to save a Single String in database,
but i have problem in case of ListCtrl because there is a Number of string,
please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: but i have problem in case of ListCtrl because there is a Number of string,
The answer is no different whether you are adding one or a hundred strings.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
no sir,
actully all others feild in table are having only one string but for two field number of string thats why i have problem.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: actully all others feild in table are having only one string but for two field number of string thats why i have problem.
I left my decoder ring at home. Can you decipher, please?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
bool CreateIFilter(const WCHAR *wcsPath)
{
IFilter *pIFilter = NULL;
HRESULT hr = LoadIFilter(&wcsPath, NULL, (void**)&pIFilter);
// error C2664: 'LoadIFilter' : cannot convert parameter 1 from 'const WCHAR **__w64 ' to 'const WCHAR *'
if (SUCCEEDED(hr))
return true;
else
return false;
}
void DumpProps(char *filename)
{
// Translate filename to Unicode.
WCHAR wcFilename[1024];
setlocale( LC_ALL, "" );
int i = mbstowcs(wcFilename, filename, strlen(filename));
setlocale( LC_ALL, "C" );
wcFilename[i] = 0;
if(CreateIFilter(wcFilename))
printf("Ok");
else
printf("False");
}
|
|
|
|
|
well, the error message is clear: why are passing the address of a pointer where a pointer is expected instead? I.e. Why don't you call the function as follows?
HRESULT hr = LoadIFilter(wcsPath, NULL, (void**)&pIFilter);
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
|
|
|
|
|
oops........ my mistake
thank you.........
|
|
|
|
|
Hi guys...
Anyone who has encountered these errors?
Or any idea how to resolve this one?
e:\mirror monitor final release\source codes\svcprogram\include\smart.h(62) : error C2011: '_IDEREGS' : 'struct' type redefinition
e:\mirror monitor final release\source codes\svcprogram\include\smart.h(77) : error C2011: '_SENDCMDINPARAMS' : 'struct' type redefinition
e:\mirror monitor final release\source codes\svcprogram\include\smart.h(104) : error C2011: '_DRIVERSTATUS' : 'struct' type redefinition
e:\mirror monitor final release\source codes\svcprogram\include\smart.h(134) : error C2011: '_SENDCMDOUTPARAMS' : 'struct' type redefinition
This is a service that will launch an application using user impersonation. I've included this one: #define _WIN32_WINNT 0x0501 cause I'm using the WTSGetActiveConsoleSessionId() function. I also have smart.h for SMART IOCTLS.
Any idea would be much appreciated. Thanks.
|
|
|
|
|
Did you put include guards on top of your header files ?
Something like this:
#ifndef MYFILE_H
#define MYFILE_H
#endif
(with MYFILE_H being something unique for each file). You can achieve the same result by putting a #pragma once at the top of the file.
|
|
|
|
|
#ifndef SVC_INFC_H
#define SVC_INFC_H
// This is the problem. If I would comment this one,
// WTSGetActiveConsoleSessionId() will go undeclared identifier.
// Otherwise, those errors I've posted a while ago.
#define _WIN32_WINNT 0x0501 // A0001
#include <windows.h>
#include <wtsapi32.h>
#include <iostream>
#include <tchar.h>
#include <winsvc.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#define SERVICE_NAME "MirrorMonitor"
#define MSGSENDER_FILENAME "appmsgsender.exe" // A0001
// default status check time interval: 60 seconds
#define DEFAULT_INTERVAL 60000
VOID WINAPI ServiceMain( DWORD argc, LPTSTR *argv);
VOID WINAPI ServiceCtrlHandler( DWORD Opcode);
BOOL InstallService();
BOOL DeleteService();
VOID ServiceInit( DWORD dwArgc, LPTSTR *lpszArgv);
VOID ReportServiceStatus( DWORD dwCurrentState,
DWORD dwWin32ExitCode,
DWORD dwWaitHint);
VOID ServiceReportEvent( LPTSTR szFunction, DWORD eventType);
VOID OnStartStatusCheck();
VOID PeriodicStatusCheck();
DWORD ReadIntervalConfigValue();
VOID WriteIntervalConfigValue(DWORD Data);
VOID WriteServiceRunValue(DWORD Data);
VOID WriteMirrorStatusValue(DWORD MirrorStatData);
BOOL LaunchUserImpersonatedMessageSender(void); // A0001
#endif
Thanks Cédric Moonen
|
|
|
|
|
Please put your code into "code block" because it is hardly readable.
|
|
|
|
|
And put a empty space between the < > symbols and the content.
#include <example.h> //without spaces
#include < Example.h > //with spaces
#include <example.h>
#include < Example.h >
</example.h>
Have a nice day
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
#ifndef SVC_INFC_H
#define SVC_INFC_H
#define _WIN32_WINNT 0x0501
#include "windows.h"
#include "wtsapi32.h"
#include "iostream"
#include "tchar.h"
#include "winsvc.h"
#include "time.h"
#include "stdlib.h"
#include "stdio.h"
#include "ctype.h"
#define SERVICE_NAME "MirrorMonitor"
#define MSGSENDER_FILENAME "appmsgsender.exe"
#define DEFAULT_INTERVAL 60000
// Function prototypes
// ...
// ...
#endif
Sorry for that messed up code.
Thanks.
|
|
|
|
|
Thanks for the desire to help. I just removed the #define _WIN32_WINNT 0x0501 and so with the WTSGetActiveConsoleSessionId(). I just used the WTSEnumerateProcesses to obtain the SessionId of the process I'm looking for. Works fine with me. Didn't come across with that terminal API so I really did have a hard time. Also, I included in the Project Settings-Link the WtsApi32.lib.
Thanks anyway. It's nice to have brilliant minds across the world that are willing to help. May the force be with this forum always.
|
|
|
|
|
How to change the interval of timer dynamically which is created already using SetTimer() ?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
you may need to destroy the previous timer event using KillTimer and assign the updated timer event again using SetTimer
|
|
|
|
|
ID should be constant!
SetTimer(ID,...);
KillTimer(ID)
SetTimer(ID,...)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
There's no need to call KillTimer . Just call SetTimer again with the same ID and the new interval.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
guys,
i get some porblem. i degine a graph region and i have drawn some grids with the following codes.
BOOL CUserInterfaceDlg::PlotGrid(void)
{
int i;
GraphRegion->
SelectObject(Brush);
GraphRegion->SelectObject(PenGrid);
GraphRegion->
FillRect(&GraphRect,&Brush);
for (i=1;i<(GraphRect.Width()/2);i++)
{
GraphRegion->MoveTo(i*((double)GraphRect.Width()/30),0);
GraphRegion->LineTo(i*((double)GraphRect.Width()/30),GraphRect.Height());
}
for (i = 1;i<(GraphRect.Height()/2);i++)
{
GraphRegion->MoveTo(0,GraphRect.Height()-i*((double)GraphRect.Height()/30)); GraphRegion->LineTo(GraphRect.Width(),GraphRect.Height()-i*((double)GraphRect.Height()/30));
}
return 0;
}
then i tried to draw another line on the grid by the following codes:
BOOL CUserInterfaceDlg::PlotRunWay(void)
{ UpdateData(TRUE);
GraphRegion->SelectObject(PenRunWay);
RXArray[0]=m_AirXPisition;
RYArray[0]=m_AirYPosition;
RPoints[0].x=RXArray[0];
RPoints[0].y=RYArray[0];
RPoints[1].x=RPoints[0].x+30000;
RPoints[1].y=RPoints[0].y+200;
GraphRegion->MoveTo(RPoints[0]);
GraphRegion->LineTo(RPoints[1]);
return 0;
}
but this is not working. it just drawing the grid lines. can anyone tell me why it happening.
thanking you all,
shohel
|
|
|
|
|
Please don't repost your message twice !
Where are you calling that code ? All drawing routines should be called from within the OnPaint handler.
Also, it is better to create a custom control instead of drawing directly on your dialog (this way, you can resize it or put it on another dialog).
Anyway, if you want to make a kind of 2D chart, I suggest you take a look at my signature: I developped a charting control and maybe you could find it usefull...
|
|
|
|