rproffitt 2,706 https://5calls.org Moderator

Again, while the SYNTAX may appear correct I find myself in Visual Studio setting a debgu break on the LOC and examining the variables.
OR printing the variables to a debug output.

You might be trying to avoid checking that.

WHY IT MATTERS. Because during execution some of the variables are results from prior calls. If a prior call returned say a NULL then execution could contine until it hit this specific LOC. LOC = Line Of Code.

Also you have to other issue of an outdated Visual Studio. I could not find documentation on this so it's best at this point to file a ticket.

BONUS: My current VS is 2022 Pro which I picked off Woot for 50 USD. I find my time is worth keeping that current.

Mr.M 123 Future Programmers

I've recreated a new project and it now doing the same thing. I will have to try creating it on a different pc just to see if the issue is with my pc or.

rproffitt 2,706 https://5calls.org Moderator

For clarity. By "correct" you would be printing those variables to the debug output and not just looking at the syntax. If you only look at the LOC then that's a sin tax.

rproffitt 2,706 https://5calls.org Moderator

Remember I can't check that your declarations are correct for the variables you are passing.

-> File a ticket to their support.

Mr.M 123 Future Programmers

I've checked even with the NCR document it's correct. Page 57 of the document you are referring to has just one code on my end

rproffitt 2,706 https://5calls.org Moderator

I'm checking page 57 of https://www.cencenelec.eu/media/CEN-CENELEC/AreasOfWork/CEN%20sectors/Digital%20Society/CWA%20Download%20Area/XFS/16926-1.pdf

Your next tasks are to verify each of the passed parameters are valid.

Mr.M 123 Future Programmers

This is very strange, if I change this code hResult = WFSExecute( hService, WFS_CMD_CDM_DISPENSE, &tDispense, TWO_MINUTES, &lpResult);

To hResult = 0;// WFSExecute( hService, WFS_CMD_CDM_DISPENSE, &tDispense, TWO_MINUTES, &lpResult);

The project does run successful but if I remove 0;// the errors are returned which the first one says missing) before ; but it is there, if I add it again it return 103 errors and complain of the ) that I've added.

Mr.M 123 Future Programmers

I've checked every line but still, I even commented out the entire code but the problem still persist.

What I've just noticed is that when I connect my laptop to an internet connection once Avast AV shows on screen then this error comes.

I have to restart the entire computer and disconnect it from the internet then it will run proper.

rproffitt commented: Stranger things. That's a new one on me that a COMPILE fails if the Internet is connected! +17
Mr.M 123 Future Programmers

I've managed to find the problem but I don't know how to fix this because what it complains with is there.

error c2143: syntax error : missing ')' before ';'

Here's the code it's points to.

hResult = WFSExecute( hService, WFS_CMD_CDM_DISPENSE, &tDispense, TWO_MINUTES, &lpResult);

rproffitt commented: A missing ) or ; could be on a preceding line +17
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I have to say that I have had both terrible and outstanding results from MS support techs. It all depends on who you get.

rproffitt commented: Microsoft doctor said "Did you turn it off and on again?" +17
rproffitt 2,706 https://5calls.org Moderator

Wrong person to ask. But it was 2 decades ago and Microsoft's support was nothing better than "did you turn it off and on again?"
This on a ERP deployment and frankly a failure in my view because it increased the amount of time we spent on the project.
Not to mention downtime as we waited for fixes and server responses times in the minutes per transaction.

Because of that experience I go "Meh" when a company has that badge.

Mason_8 0 Newbie Poster

I've been reading about the Microsoft Solutions Partner program and wanted to ask the community is it actually worth pursuing for an IT company

It looks like Microsoft has set certain performance and certification requirements that companies need to meet in order to qualify. They have categories like Infrastructure, Data & AI, Business Applications, and more.

Some people say it's just a marketing badge. Others claim it offers real benefits such as early access to Microsoft tools, better technical support, and more trust from clients.

I'd like to hear from others here:

Have you worked with or for a Microsoft Solutions Partner?

Did it make a noticeable difference in project delivery or customer experience?

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

The trick with AI is to give it very short bits of code to write at a time. If you ask it to write an entire mini-program that does X, it inevitably gets quite a few bits wrong, left out, etc. But if you ask it to write pseudocode first, and then for each individual method/function call, you carefully explain what you want it to do, what parameters should be passed in and out, and what should be processed, then it is able to follow clear instructions and save you time writing it yourself. It’s honestly all about the prompts.

rproffitt 2,706 https://5calls.org Moderator

Given the antipathy towards AI here, all I can share is if you put "i want to add Crosshair , a vertical and horizontal line to view the value of the axis
is this available for charts in vb.net 2017." into a chatgpt session, you'll find a solution in about 20 seconds.

PM312 commented: Thank you very much. got the perfect code in much simple way. this is the first time i have used chatgpt and it will be useful in future +0
rproffitt 2,706 https://5calls.org Moderator

Sorry but I only have VS2008 and VS2022 now. But for a real-time crosshair that moves with the mouse, showing its position along the X and Y axis I asked ChatGPT and it appears to only need less than 20 lines of code that respond to Chart1_MouseMove().

PM312 commented: Thanks , but i dint find any code on Google for vb.net but available for other languages\platforms . Any ling you can provide it will be helpful. +5
PM312 47 Junior Poster in Training

i want to add Crosshair , a vertical and horizontal line to view the value of the axis
is this available for charts in vb.net 2017.

chart_2.png

SCBWV 71 Junior Poster

IDK about ASP, but in desktop apps you can call LockWindowUpdate in user32 to pause the update until after the treeview has been populated.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Two possible ways to handle this:

  1. Populate the tree in a separate thread
  2. Only populate sub-nodes as required to view

You can do option 2 by putting the "populate directly under this node" code in the event that gets triggered when you select a node.

kinvieb 0 Newbie Poster

Hi,
My first and quick point of view is that if you have a chart with such a big amount of data points, there might not be a need to show all individual data points. For the axis values, you may just choose to show points at a given interval, to avoid the congestion. For the data labels, you can choose to show labels at particular points (like maxima, minima, etc.) or any predefined values set by the purposes of the study.
Best regards
Kinvieb

Volochain1 0 Volochain MLM Software

When displaying extensive MLM (Multi-Level Marketing) hierarchies using TreeView in ASP.NET, performance issues often arise due to the sheer volume of nested nodes. Loading thousands of members at once can slow down the interface, increase page load time, and degrade user experience.

toneewa 115 Junior Poster

I've seen this problem before with the .rc and resource.h files, when changing icons.

Backup what you have. I remember I had to remove the resource files from the project, and the additional resource (e.g., resource1.h, resource2.h) generated headers from the project folder, when adding a new icon to replace the default.

It's probably easier to just start a new project and copy the code and redo the library with the default icon and practice your steps of replacing the icon.

I ruled it the auto-generated files everytime you delete something to cause the issue.

Does that sound familiar?

However, the compiler errors still point to some .lib or .dll file(s), function call order, and syntax error.

//Incorrect starter.h

#include "Forms1.h";

#define MY_MACRO 1 // Comment
You cannot comment after a #define or have any whitespace, tabs, spaces after.

Hope this helps. :)

PM312 47 Junior Poster in Training

I have a candlestick chart with long list (data point) on X-Axis which becomes congested when loaded.

How to show datapoint with sufficient space . Is there any container with horizontal scroll bar to display chart just like data is displayed in DataGrid view without reducing column width.
Chartcandlestick.png

Mr.M 123 Future Programmers

Thanks, I've never used Git before.

I've commented out all the code but still. What I think might be producing this problem is the resources.

I added a new item then changed the default to a new icon. But I did run the project successfully that time.

This is the only thing I suspect might be a result of this problem. How can I clean the resource file to make sure there are no broken link or something?

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

I will also add that Git is built into almost all IDEs. It's the default version control for Visual Studio 2019 and forward. Are you still using VS 2010? There are some Git plugins for VS 2010 as well:

https://stackoverflow.com/questions/16989962/visual-studio-2010-2012-git-plugin

Salem 5,265 Posting Sage

Let me clarify, the project was running fine, only started experiencing this in few weeks ago.#

https://en.wikipedia.org/wiki/Git

Start using it.

Every time you make forward progress, you make a commit.

Every time you make a mess of it, you revert to the last known good state and try again.

Mr.M 123 Future Programmers

I've tried doing the extern to all these variables but still.

Let me clarify, the project was running fine, only started experiencing this in few weeks ago.

Regarding the question about the OpenXFS project (Library) the library is here and it's linked.

What I will do is try commenting out all the code and try debugging and see if it will debug and if it does I will uncomment one line of code at a time and see if I will figure out where's the problem if it's within the code

toneewa 115 Junior Poster

I like the challenge, but hate when errors like these occur.

Check for a syntax error on line 2 in starter.h
starter.h(2): warning C4067: unexpected tokens following preprocessor directive - expected a newline

Hard to say without seeing code. Some cases m_hservice may require you to use the .lib file Advapi32.lib it if it isn't automatically linked. #pragma comment(lib, "Advapi32.lib")
Add what you need to the Project Properties > Linker > Input > Additional Dependencies

Check to make sure you have all your .lib files and paths included in the project.
E.g., verify the .lib or header file for _wfsversion.

You can also do Build > Clean Solution, and Rebuild. If you change the order of functions, and reuse old object files, you can run into this.

You can also use #define _CRT_SECURE_NO_WARNINGS before your header declarations to suppress those warnings.

Determine where these definitions are, and what is required for them:

unsigned short MyProjectName::m_hservice
struct _wfsversion MyProjectName::m_verSion
long MyProjectName::m_hr
unsigned long MyProjectName::m_dwRVersion

Here is an example using them.

#include <windows.h>
#include <iostream>

#pragma comment(lib, "Advapi32.lib")

struct _wfsversion {
    int major;
    int minor;
    int build;
};

class MyProjectName {
public:
    SC_HANDLE m_hservice;  
    SC_HANDLE m_hSCManager;  
    struct _wfsversion m_verSion; 
    long m_hr;  
    unsigned long m_dwRVersion;  

    MyProjectName() : m_hservice(nullptr), m_hSCManager(nullptr), m_hr(0) {
        m_verSion = { 1, 6, 10 }; 
        m_dwRVersion = (m_verSion.major << 16) | (m_verSion.minor << 8) | m_verSion.build;
    }

    bool OpenServiceHandle(const std::wstring& serviceName) {
        m_hSCManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT);
        if (!m_hSCManager) {
            m_hr = GetLastError();
            std::cerr << "Failed to open …
rproffitt 2,706 https://5calls.org Moderator

I followed the build process and when I hit OpenXFS_V0.0.0.5 I went looking for that project to see if folk were having build problems.

Where is this OpenXFS project to be found?

I worry this is from some Linux project and may not be ready for Win and VS2010.

wwwalker 49 Newbie Poster

When compiling no relevant libraries have been included for linker to link so the executable won't run as it can't be compiled with missing libraries.

In C and C++ code, the library header includes are at the top of the page.

E.g.:
#include <iostream>

Go through each error where code requires a library to be linked and add those includes at the top then recompile and hopefully you have linked all relevant libraries for your code to compile and a valid .exe file will be generated and be able to be open and run.

For function strncpy, you need these to be included at top of program:

#include <stdio.h>
#include <string.h>

Unreferenced local variable means they have not been declared in scope. Declare those variables like:
data
WfsVersion

Error says use strncpy_s instead of strncpy. Try doing that.

Salem 5,265 Posting Sage

1>C:\Users\mypcname\Documents\Visual Studio 2010\Projects\myprojectname\Debug\myprojectname.exe : fatal error LNK1120: 16 unresolved externals

This is why you don't have an executable file.

Example:

1>myprojectname.obj : error LNK2020: unresolved token (0A0000DF) "unsigned short MyProjectName::m_hservice" (?m_hservice@MyProjectName@@$$Q3GA)
1>starter.obj : error LNK2020: unresolved token (0A0000DB) "unsigned short MyProjectName::m_hservice" (?m_hservice@MyProjectName@@$$Q3GA)
1>home1.obj : error LNK2020: unresolved token (0A0000DB) "unsigned short MyProjectName::m_hservice" (?m_hservice@MyProjectName@@$$Q3GA)

You need to define these symbols somewhere in your code for it to compile an executable.

Mr.M 123 Future Programmers

Here's the log, I had posted it yesterday I don't know what happened to it now or it was removed?

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

Can you please save the log as a text file and attach it as an attached file here? Much thanks! :)

rproffitt 2,706 https://5calls.org Moderator

Since no details such as logs were shared, others can't find Waldo.

Mr.M 123 Future Programmers

I tried saving logs and going through it but I don't see where it indicate where's the problem.

Temporal -8 Newbie Poster

Yes! When I studied Software Development at UNIAT, I learned there are good GitHub alternatives like GitLab, Bitbucket, SourceForge, and Azure DevOps. Each has its strengths depending on your needs and workflow. Have you tried any?

Dani commented: AI generated? -8
Temporal -8 Newbie Poster

Great topic! When I studied Game Design and Art at UNIAT, we also touched on Flutter and state management, which is key for solid apps.

Flutter manages state through its widget tree, with setState() rebuilding parts as needed. For bigger apps, tools like Provider, Riverpod, and BLoC help manage complexity.

Provider is simple and good for medium projects, Riverpod improves scalability and testing, and BLoC suits apps with complex logic but has a steeper learning curve.

It really depends on the project and team, but understanding how Flutter rebuilds widgets helps pick the right approach. Have you tried any yet?

Dani commented: AI generated? +0
toneewa 115 Junior Poster

I've seen this happen from Windows Defender nuking Visual Studio's compile process.
Make sure the PC is set to Developer Mode.
Whitelist the directories involved in Windows Defender.
This could happen after a Windows Update.

Check the "defender" log and see if there is any file(s) to restore.
Restarting the PC will resolve any hung/background processes that may or may not be running from VS.

I've explored self app signing and certificates, as well as giving the app raised privilages by default. There's no way I'll ever pay for a DigiCert or some other Certificate Authority (CA) for Microsoft.

I hate false positives.

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

First of all, let me be blunt. I believe that Enzo only resurrected a 12 year old thread with the intent of spamming. You and I know that because, as moderators, we see in his profile his spamming attempts and his infractions. However, no one else coming across this thread sees that or knows that, so the other 2000 people reading this thread may look at his post through a completely different lens than you or I.

My downvote was for the benefit of all of those people. I want us to be known as a friendly community where newbies can feel welcome to post anything and there are no dumb questions and no one should ever be made to feel dumb for any code they post, no matter how wrong it might be. I feel like your comment accusing their teacher of teaching it poorly, and then preaching "malpractice makes malperfect", etc. could be taken the wrong way. For example, what do you expect a student to do with being told, "Good programming habits should be taught from the start"? Are they meant to respond in agreement? It can potentially come across as being chastised for doing something that their teacher taught them. My most important thing here is that your response is never for the one person you're responding to, but always for the thousands of people who come after and read what you have to say. Newbies who come across moderators saying things like this can make …

rproffitt 2,706 https://5calls.org Moderator

Here's a page about how to create and view your VS log files to point you to where or why the compile failed.

https://learn.microsoft.com/en-us/visualstudio/ide/how-to-view-save-and-configure-build-log-files?view=vs-2022

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Why put them down?

Please explain to me how anything I said was a put down. If someone told me their methof of counting cows was "count the number of legs and divide by four", I would point out that it would be simpler just to count the number of cows. If I said "That's stupid, just count the cows", then that would be a put down. What I did was to advocate for simple over complex.

I think you are being too quick to downvote.

rproffitt commented: And then I googled "3 legged cow". So would they call this a three quarter cow? +0
rproffitt 2,706 https://5calls.org Moderator

Since the file is not generated, try a full compile. Be sure you change to Debug for this build.
You usually can't debug what you didn't compile.

Example: There were compile or build errors which stopped the creation of the .exe file. But no mention of compile errors so I wouldn't write about that here.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't know why you would use reduce and lambda when you could just do

sum(numbers)

And the directive

You should make use of two higher-order functions (i.e., map and reduce, or something else) to simplify the design.

is self-contradictory as using map and reduce instead of sum does not simplify the design. It complicates it. That goes against the core principles of Python. If that was a school assignment then the teacher is teaching it poorly. Malpractice makes malperfect. Good programming habits should be taught from the start.

Dani commented: I think you’re being pretty tough on someone trying to learn. Why put them down? -8
rproffitt commented: That's sums up. +17
Enzo_3 34 Newbie Poster Banned

I was working on a similar assignment where I had to compute the average of numbers from a text file using higher-order functions like map() and reduce(). I was really stuck on how to incorporate them meaningfully, but I finally figured it out.

Here's how I approached it using Python:

from functools import reduce

with open('numbers.txt', 'r') as file:
    content = file.read()

number_strings = content.split()
numbers = list(map(int, number_strings))
total = reduce(lambda x, y: x + y, numbers)
average = total / len(numbers)

print("Average:", average)

This worked perfectly for the numbers in the file and helped me understand how to use functional programming in a real example.

Dani commented: Feel free to link to other websites in your forum signature (in control panel) +34
Mr.M 123 Future Programmers

@rproffitt I tried that with no luck

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

When you browse the file system, does that file exist and is it accessible by the logged-in user? (Sorry, no VS experience.)

Mr.M commented: The file is not generated +8
rproffitt 2,706 https://5calls.org Moderator

Given only this I won't be able to do more than comment how I use the Visual Studio system to debug my app.

  1. I open the project.
  2. I set the build to "Debug".
  3. I set breakpoints on lines of code I suspect to be problematic.
  4. I run the app while in Visual Studio.

That's usually enough to track down what I did wrong.

Mr.M 123 Future Programmers

Hi DW, I'm getting this error when I try to debug, it says it can't open "c:\users\myusername\Documents\Visual Studio 2010\Projects\myprojectname\debug\myprojectname.exe"

How can I solve this?

dev_281 0 Newbie Poster

The Developer makes SharePoint "do more" and look better.

The Administrator keeps it running smoothly, securely, and reliably

sophiabrooks 0 Newbie Poster

Flutter internally handles state management through a combination of mechanisms: Stateful Widgets, declarative UI updates, and various libraries for managing app-wide state.

ThinkWriteGrow 0 Newbie Poster Banned

What are some best practices for optimizing memory management when working with large datasets?

I am tagging this topic both with php (because that is my language of choice, and the one I work with big data with) as well as c++ (because I know DaniWeb has a large low level c++ community that is well suited to being able to delve into this topic into depth, and because years ago when I focused on c++ myself, I was very focused on efficiency).

To optimize memory management with large datasets, start by using efficient data types to minimize memory usage. Load data in smaller chunks instead of all at once, and avoid unnecessary data copies by working with references or views. Tools like memory-mapped files or libraries such as Dask can help handle big data efficiently. Also, remember to clean up unused objects promptly to free up memory. These steps will keep your processing smoother and faster.